Home >Backend Development >PHP Tutorial >如何去掉文章里的 html 语法

如何去掉文章里的 html 语法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 14:29:14896browse

$a="这是一个带HTML标识的字串";
$a=strip_tags($a);
PRint $a;
?>


2

$a="这是一个带HTML标识的字串";
ereg_replace("^<.>$", "", $a);
print $a;
?>


3 保留原有内容


$a="这是一个带HTML标识的字串";
ereg_replace(" ereg_replace(">", ">", $a);
print $a;
?>
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
Previous article:PHP与MySQL交互使用详解Next article:谈谈PHP语法(4)