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

From: Date: Wed, 30 Jan 2002 04:25:40 +0000
Subject: RE: [PHP] Swapping <BR> for \n... ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82669@lists.php.net to get a copy of this message
On Tue, 2002-01-29 at 20:19, Douglas Maclaine-cross wrote: > Or an even simpler str_replace("\n", "<BR>", $sourcestring); Which will also be much faster than the ereg_replace(), to boot. Cheers, Torben > -----Original Message----- > From: Jason Murray [mailto:Jason.Murray@melbourneit.com.au] > Sent: Wednesday, January 30, 2002 15:14 > To: 'Jon'; php-general@lists.php.net > Subject: RE: [PHP] Swapping <BR> for \n... ? > > > > 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? > > Sounds like you want a simple ereg_replace("\n", "<BR>", > $sourcestring); > > Jason > -- Torben Wilson <torben@php.net> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506

« previous php.general (#82669) next »