[RESOLVED] search replace help
I am trying to remove specific HTML tags from from text. I am currently working with the str_ireplace but it is starting to get cumbersome because there are so many ways to write the same tag. This is what I have now
PHP Code:
$search=array('<p>','</p>','</ p>','<p/>','<p />','<br>','</br>','</ br>','<br/>','<br />');
$replace=array('','','','','','','','','','');
and that is only two of the tags I want to remove. By the time I am done this line will be a mile long.
I tried reading the pattern rules to preg_replace but something unexpected happened, my head detached from my neck and hit the floor. :eek2:
There must be a simpler way. (using a case-insensitive function is a bonus :thumb:)