RE: help with nl2br

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
some text copy<br />
<br />
Some more copy<br />

What I want instead is
<p>Some text copy</p>

<p>some more text copy</p>
[/snip]

What you want to do is start with a <p>, then when you run into 2 \n\n
you want to replace it with </p><p> and then end with a </p>
http://www.php.net/preg_replace

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux