Re: problems with replacing line breaks
| From: | Julio Nobrega Trabalhando | Date: | Fri, 01 Mar 2002 15:40:48 +0000 |
| Subject: | Re: problems with replacing line breaks | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86775@lists.php.net to get a copy of this message | ||
Have you tried nl2br()?
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"Tom Kincaid" <tom_kincaid@hotmail.com> wrote in message
news:F99rd58ircfI7hiSkS700001b3f@hotmail.com...
> I'm trying to replace line breaks with html code and am having problems.
For
> single lines preg_replace("/\n/","<br>",$text) or
> ereg_replace("\n","<br>",$text) adds the <br> but doesn't
> remove the line
> break. While preg_replace("/\n\n/","<p>",$text) doesn't find any
> double
line
> breaks, even though they're there. Why doesn't this work?
>
>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger:
> http://messenger.msn.com
>