Re: Problems with user's newlines

From: Date: Mon, 10 Jul 2000 21:10:36 +0000
Subject: Re: Problems with user's newlines
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5813@lists.php.net to get a copy of this message
"kris" <kris@bellatlantic.net> wrote... > I have been trying to do ereg_replace on the strings: > > $string = ereg_replace("\n","<BR>",$string); > > I'm getting the <BR>'s, but still the newlines seem to be there. Perhaps the newlines are \r\n rather than just \n. The nl2br() function is the easiest way to take care of all variations.

« previous php.general (#5813) next »