I have a html code that contains:
<ul>
<li></li>
<li></li>
<li></li>
</ul>
after parsing it using php DOMDocument
and using saveHTML
function of it, the result is:
<ul>
<li>
<li>
<li>
</ul>
this only happens with <li>
tags. how to force the output to include closing tag for <li>
tags?
I tried to solve with regex but couldn't find a solution. If you have a regex solution I accept it too.