2 $a="这是一个带HTML标识的字串"; ereg_replace("^$", "", $a); print $a; ?> 3 保留原有内容 $a="这是一个带HTML标识的字串"; ereg_re">
输入banner图图片脚本导航/分类

如何去掉文章里的html语法_PHP

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


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


3 保留原有内容

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