kalster Posted February 23, 2014 Share Posted February 23, 2014 using php regex, i would like to remove everything within a <div></div> and including both div that contains "<hr> </b>" inside of the divs. notice the space between "<hr> </b>" the following line needs to be removed... <div><b>username<hr> </b></div>from a string but only if the div contains <hr> </b> both with a space between them thank you Link to comment https://forums.phpfreaks.com/topic/286434-php-two-html-tag-remove/ Share on other sites More sharing options...
.josh Posted February 23, 2014 Share Posted February 23, 2014 $content = '<div><b>username<hr> </b></div>'; $content = str_replace('<div><b>username<hr> </b></div>','',$content); Link to comment https://forums.phpfreaks.com/topic/286434-php-two-html-tag-remove/#findComment-1470291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.