Re: str_replace help

From: Date: Fri, 02 Apr 2010 15:22:22 +0000
Subject: Re: str_replace help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-303752@lists.php.net to get a copy of this message
On 04/02/10 18:58, David Stoltz wrote:
Hi folks, In ASP, I would commonly replace string line feeds for HTML output like this: Var = replace(value,vbcrlf,"<br>") In PHP, the following doesn't seem to work: $var = str_replace(chr(13),"\n",$value) Neither does: $var = str_replace(chr(10),"\n",$value) What am I doing wrong? Thanks!
Use nl2br. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com मेरा भारत महान ! मम भारत: महत्तम भवतु !

« previous php.general (#303752) next »