PHP pulls data from a table which is a list in HTML format:
<ul>
<li>first line of text</li>
<li>second line of text</li>
<li>third line of text</li>
<li>forth line of text</li>
<li>fifth line of text</li>
<li>sixth line of text</li>
<li>seventh line of text</li>
</ul>
which is outputted by:
<?php echo $lines; ?>
However i would like to use a foreach so that i can take that list and output in the following format if possible
<span>first line of text</span>
<span>second line of text</span>
<span>third line of text</span>
<span>forth line of text</span>
<span>fifth line of text</span>
<span>sixth line of text</span>
<span>seventh line of text</span>
I want to strip out the ul and li, and replace the li by span tags, is this possible?
$lines