Re: note 9586 added to nl2br
| From: | J. M. Castagnetto | Date: | Tue, 14 Nov 2000 06:58:00 +0000 |
| Subject: | Re: note 9586 added to nl2br | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7657@lists.php.net to get a copy of this message | ||
Ehem, there *is* a way to reverse htmlspecialchars(),
look at the manual entry for
get_html_translation_table(). Also a simple
str_replace()/ereg_replace()/preg_replace() would do
the "<br>" to "\n" conversion
(the info above will be added to your note)
--- php@fendforyourself.com wrote:
> 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
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/