note 14351 added to function.nl2br.php
| From: | codey at uni dot de | Date: | Fri, 27 Jul 2001 08:49:16 +0000 |
| Subject: | note 14351 added to function.nl2br.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15910@lists.php.net to get a copy of this message | ||
[PHP 4.04pl1] nl2br didn't work for me for some reason.<BR> It didn't convert any
nls, although they were visible in my hex editor. However, with the above example it works great, if
you just replace the < and > with "<>", like this:
$newline = ereg_replace("(\n)", "<BR>",$newline);
http://www.php.net/manual/en/function.nl2br.php