I wonder if there is any way to remove a specific tags from a php string?
I have knowledge of several features that make it, for example strip_tags, but what I really want is to remove tags containing the class attribute or any, I give an example below:
$string = '<p>Test paragraph.<p class="inner">Here is some inner text</p></p>';
How I can remove only the tag containing the class attribute 'inner'?
If anyone can tell me a way to do this, I'd be grateful.