SyntaxFix
Write A Post
Hire A Developer
Questions
$string = <p>Awesome</p><b> Website</b><i> by Narayan</i>. Thanks for visiting enter code here; $tags = array("p", "i"); echo preg_replace('#<(' . implode( '|', $tags) . ')(?:[^>]+)?>.*?</\1>#s', '', $string);
Try this