str_replace help
| From: | David Stoltz | Date: | Fri, 02 Apr 2010 13:28:37 +0000 |
| Subject: | str_replace help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-303749@lists.php.net to get a copy of this message | ||
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!