Re: Extra spacing with <br> in HTML
| From: | Justin French | Date: | Sun, 28 Jul 2002 08:04:10 +0000 |
| Subject: | Re: Extra spacing with <br> in HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110034@lists.php.net to get a copy of this message | ||
I *think* you've got a typo -- you've said ln2br instead of nl2br i think.
Aaaannny way, you can't modify WHAT php does in nl2br, but you can do
something to the resulting code, like replacing "</li><br />" with
"</li>":
<?
$original = "<ul><li>Blar</li></ul>";
$new = nl2br($original);
$new = str_replace('</li><br />', '</li>', $new);
?>
Either that, or write your own version of nl2br which ignores </li> (*no
way* I'd both doing this!!!!)
Justin French