Can anybody give a hint for how to replace the first <ul> and last </ul> tag from the string $string:
Code: Select all
$string = '<ul>
<li></li>
<li>
<ul>
<li>
</li>
<li></li>
</ul>
</li>
<li></li>
</ul>';