I have html code like this :
<li>some text
more text
<li>some other text
any more text
I would like to close the list items. An Item shall be closed on a line break. The result shall look like this:
<li>some text<li>
more text
<li>some other text<li>
any more text
This is my regex, which does not work:
preg_replace("/<li>+(.*?)+/ig","\\2</li>", $o );
It returns nothing instead of:
<li>some text<li>
more text
<li>some other text<li>
any more text
Many Thanks