RE: [PHP] Re: Swapping <BR> for \n... ?

From: Date: Wed, 30 Jan 2002 04:47:52 +0000
Subject: RE: [PHP] Re: Swapping <BR> for \n... ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82675@lists.php.net to get a copy of this message
That regex is equivilent to: "/(\r\n)|(\r)|(\n)/", you don't need to use the numeric values. > -----Original Message----- > From: Jon [mailto:Jon@digital-explosion.co.uk] > Sent: Tuesday, January 29, 2002 11:22 PM > To: php-general@lists.php.net > Subject: [PHP] Re: Swapping <BR> for \n... ? > > > Nevermind, I found some code at last which actually works : > > $txt = preg_replace("/(\015\012)|(\015)|(\012)/","<BR>",$txt); > > "Jon" <Jon@digital-explosion.co.uk> wrote in message > news:20020130041038.83238.qmail@pb1.pair.com... > > I'm processing a form but all the functions I've found on the web only > seem > > to add the <BR> after the \n. I need to remove the \n altogether - anyone > > know how I can kill the \n and put a <BR> in it's place? > > > > Cheers, > > Jon > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#82675) next »