note 9682 added to ereg_replace
| From: | cculver at memphis dot edu | Date: | Sun, 19 Nov 2000 01:34:50 +0000 |
| Subject: | note 9682 added to ereg_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7871@lists.php.net to get a copy of this message | ||
I saw above that someone stated that you needed to use the ASCII code for a carriage return to
replace it. Actually, this method is a lot easier:
$News = ereg_replace ("\n", "<br>", $News);
In this case, it replaces every carriage return in the $News string with a <BR> basically
converting it into HTML.
http://www.php.net/manual/function.ereg-replace.php