I would like to use DOMDocument or another proposed method to do the following in wordpess:
I have this html saved in a variable:
<div id="gallery-3232" class="gallery gallery-3232">
<li><a href=""><img src="" alt="" /></li>
<li><a href=""><img src="" alt="" /></li>
<li><a href=""><img src="" alt="" /></li>
<li><a href=""><img src="" alt="" /></li>
</div>
And I would like to end up with a variable containing that:
<li><a href=""><img src="" alt="" /></li>
<li><a href=""><img src="" alt="" /></li>
<li><a href=""><img src="" alt="" /></li>
<li><a href=""><img src="" alt="" /></li>
How can I do this but without javascript. With the use of PHP.
Thabnk you
1 Answer