Home >php教程 >php手册 >如何去掉文章里的 html 语法_php基础

如何去掉文章里的 html 语法_php基础

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-17 09:09:421422browse

$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