Re: replacing \n with <br>
| From: | David T-G | Date: | Fri, 06 Sep 2002 16:46:15 +0000 |
| Subject: | Re: replacing \n with <br> | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115521@lists.php.net to get a copy of this message | ||
Brent, et al --
..and then Brent Baisley said...
%
% Why not just use the nl2br() function? It's a lot easier that using any
Because it doesn't do what I need. From the Fine Manual:
nl2br -- Inserts HTML line breaks before all newlines in a string
string nl2br ( string string)
Returns string with '<br />' inserted before all newlines.
I don't want to simply add a <br>; I want to *replace* the newline (and
return, as we found out in a subthread).
% replace function you build yourself.
Except that it doesn't work :-)
Thanks & HAND
:-D
--
David T-G * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!