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? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.