I have code that iterates through a database using PHP, and processes the HTML to look like this:
First line etc<br />
Text blah blah blah blah, etc<br />
Moar text blah blah blah,<br />
<ul>
<li>List Item 1</li>
<li>List Item 2</li>
</ul>
However, I want the <br />
immediately before the <ul>
removed. i.e.
...
Moar text blah blah blah,
<ul>
...
I cannot use CSS to correct this problem, as it is being parsed into a PDF format.
How do I go about removing the <br />
immediately before a <ul>
(or <ol>
)?
Thanks in advance
');` where your loop condition is `$i < $count` else if it is `$i <= $count` {`echo $string . ($i == $count ? '' : '
');`} – 19greg96 Aug 02 '12 at 11:30