note 9586 added to nl2br
| From: | php at fendforyourself dot com | Date: | Mon, 13 Nov 2000 21:57:58 +0000 |
| Subject: | note 9586 added to nl2br | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7644@lists.php.net to get a copy of this message | ||
Someone asked why there was no br2nl(). I think it's probably in most cases you want to take
your data and display it in HTML, so it is probably already stored with the \n. Storing it with the
<br>'s instead would just take up extra space and there's no point in doing that
when you can always convert it on display.
I'm assuming this is the same reason there is no built in reverse to htmlspecialchars().
http://www.php.net/manual/function.nl2br.php