Okay i am looking for a way to have this:
<li>stuff</li><br />
Stripped of the ending
<br />
That gets added to it when i do a nl2br function in php.
Or do you think a better idea would be to strip all new lines inside
<ul>
tags?
This is part of a bbcode->html function for articles on my website.
Why not simply use str_replace
?
$myString = str_replace('</li><br />', '</li>', $myString);
This removes all <br />
tags that follow a </li>
.
As for removing br: str_replace br to empty string '' in your string