note 15422 rejected and deleted from function.nl2br by zak
| From: | zak@php.net | Date: | Mon, 10 Sep 2001 05:33:33 +0000 |
| Subject: | note 15422 rejected and deleted from function.nl2br by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17858@lists.php.net to get a copy of this message | ||
Hmm, seems that this page can't doesn't convert tags - how ironnic! :)
Anyway, just to be a bit constructive ;)
here's a (system independent) way to replace linebreaks with html-linebreaks:
$text = ereg_replace("(r?n|r)", "<br>", $text);
(the second argument should be <br%gt; in case it doesn't show right).
If you want the old effect of nl2br(), just insert "n" after the br-tag...