<?$str="<p>x";
if (strip_tags($str) != $str) {
 echo "has html tags";
} else { echo "not have";}
?>