I've got a string, $content
, that contains:
<p>Some random text <img class="alignnone" src="logo.png" alt="" width="1920" height="648"></p>
Now I want to delete the image tag:
<img class="alignnone" src="logo.png" alt="" width="1920" height="648">
I tried strip_tags
but that isn't working anymore.
$content = strip_tags($content, '<img></img>');