$contents = "Your HTML string";

// Part 1
// This array is for single tags and their closing counterparts

$tags_to_strip = Array("html","body","meta","link","head");

foreach ($tags_to_strip as $tag) {
       $contents = preg_replace("/<\/?" . $tag . "(.|\s)*?>/","",$contents);
}

// Part 2
// This array is for stripping opening and closing tags AND what's in between

$tags_and_content_to_strip = Array("title");

foreach ($tags_and_content_to_strip as $tag) {
       $contents = preg_replace("/<" . $tag . ">(.|\s)*?<\/" . $tag . ">/","",$contents);
}
bu kodu buldum ama denedim bilemiyorum sonuçları. çalışmazsa arama için anahtar kelime "html tag filter" kolay gelsin., kusura bakma tam yardımcı olamadım.