johnsmith153 Posted June 15, 2012 Share Posted June 15, 2012 So I have: $text = 'Hello <img src='file' /> <table><tr><td>remove this</td></tr></table> but keep this'; ... and I want to remove the entire image and entire table. I know strip_tags removes tags but I want the text inside the tags gone as well. Any ideas? Link to comment https://forums.phpfreaks.com/topic/264249-how-remove-everything-inside-and-tags/ Share on other sites More sharing options...
yoursurrogategod Posted June 15, 2012 Share Posted June 15, 2012 Change what $text gets set to in the first place by constructing specific HTML. Link to comment https://forums.phpfreaks.com/topic/264249-how-remove-everything-inside-and-tags/#findComment-1354203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.