note 8672 added to str_replace
| From: | tegel at chello dot nl | Date: | Sat, 23 Sep 2000 08:33:16 +0000 |
| Subject: | note 8672 added to str_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5395@lists.php.net to get a copy of this message | ||
Yeah nice. but in order to replace text newlines to HTML friendly <BR> one should not try to:
$html=str_replace('\n',$text);
but:
$html=str_replace(chr(10),$text);
(microsoft text-files)
http://www.php.net/manual/function.str-replace.php