note 11276 modified in str_replace by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 14 Feb 2001 01:46:31 +0000 |
| Subject: | note 11276 modified in str_replace by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11021@lists.php.net to get a copy of this message | ||
[Editor's note: see also nl2br(), a function that does exactly this - jmcastagnetto@php.net]
If you want to make it really HTML friendly with the formatting intact use:
$text = str_replace("\n","<br>",$text);
http://www.php.net/manual/str-replace.php