Archive for May, 2009



Replace multiple lines by just one in PHP

Comments

I banged her head a little to find the regular expression but here goes:
PLAIN TEXT
PHP:

$ String = preg_replace ("/ (\ r \ n | \ n | \ r )+/"," \ n ", $ string);


Português flagItaliano flagCoreano flagChinês (simplificado) flagEnglish flagAlemâo flagFrancês flagEspanhol flag
Japonês flagÁrabe flagRusso flagHolandês flagBúlgaro flagTcheco flagCroata flagDinamarquês flag
Finlandês flagHindu flagPolonês flagRomeno flagSueco flagGrego flagNorueguês flag 
By N2H
Dolet 96 discount on hosting Dreamhost!
Use the "PROMO CODE" inertia. LAMP with 20GB of space and 1TB of transfer.

Categories