$a="This is a string with HTML tags";
$a=strip_tags($a);
print $ a;
?>
2
$a="This is a string with HTML tag font>";
ereg_replace("^<.+>$", "", $a);
print $a;
?>
3 Keep the original content
$a="This is a string with HTML tag";
ereg_replace("< ;", "<", $a);
ereg_replace(">", ">", $a);
print $a;
?>
http://www.bkjia.com/PHPjc/315220.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/315220.htmlTechArticle? $a=font color=red This is a string with HTML logo/font; $a=strip_tags ($a); print $a; ? 2 ? $a=font color=red This is a string with HTML identifier /font; ereg_replace(^.+$, , $a); pr...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn