Re: \n and <br>

From: Date: Tue, 11 Nov 2003 19:51:37 +0000
Subject: Re: \n and <br>
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-169200@lists.php.net to get a copy of this message
Brian V Bonini wrote:
So just change it.... $string = nl2br($content->page_content); $string = eregi_replace("<br />", "<br>", $string);
Why not directly str_replace(array("\r\n","\r","\n"), '<br>', $content->page_content);

« previous php.general (#169200) next »