im using php and i wanna know how to delete when <p><a><img></a></p>
from this:
<p>
<strong>Lorem</strong>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
</p>
<p>Lorem ipsum dolor
<a href="xxxx" target="yyy">sit amet
</a>, consectetur adipisicing elit, sed do eiusmod
</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
<img alt="" height="xxx" src="yyy" width="zzz" />
</p>
<p>
<a href="xxx" target="_blank">
<img alt="" height="xxx" src="yyy" width="zzz" />
</a>
</p>
to this:
<p>
<strong>Lorem</strong>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
</p>
<p>Lorem ipsum dolor
<a href="xxxx" target="yyy">sit amet
</a>, consectetur adipisicing elit, sed do eiusmod
</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
<img alt="" height="xxx" src="yyy" width="zzz" />
</p>
<a href="xxx" target="_blank">
<img alt="" height="xxx" src="yyy" width="zzz" />
</a>
i just wanna delete tag <p></p>
when <p><a><img></a></p>
i've tried using preg_replace(); function but i cant get it could you please help me, thanks