note 10347 added to nl2br
| From: | snapfrozen at nodomain dot com | Date: | Fri, 29 Dec 2000 12:28:30 +0000 |
| Subject: | note 10347 added to nl2br | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9206@lists.php.net to get a copy of this message | ||
Bill,
The pre isnt needed, I think that people were only adding it in order to display their html tags..
they dont seem to be needed in that case anyway :-)
The following works perfectly:
if ($submit): // The content has been submitted via form..
$stuff = nl2br($stuff);
$stuff = ereg_replace("\n", "", $stuff);
$stuff = ereg_replace("\r", "", $stuff);
Dono
http://www.php.net/manual/function.nl2br.php