on 28/07/02 12:53 PM, Jason Stechschulte ([EMAIL PROTECTED]) wrote:

> There might be an easier way, but you might just have to write your own
> code for this.  Something along the lines of: (completely untested)
> 
> <?php
> $line = ereg_replace("(^li|^ul|^ol)>\n", "<br />\n", $line);
> ?>

Definately an easier way (IMHO) -- just let nl2br() do what it does, then
replace the problematic </li><br /> with just a <br />:

<?
$original = "<ul><li>Blar</li></ul>";
$new = nl2br($original);
$new = str_replace('</li><br />', '</li>', $new);
?>


Justin


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

Reply via email to