2$a="这是一个带HTML标识的字串"; ereg_replace("^$", "", $a); print $a; ?> 3 保留原有内容$a="这是一个带HTML标识的字串"; ereg_replace("ereg_repla">
输入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;
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/315220.htmlTechArticle? $a=font color=red这是一个带HTML标识的字串/font; $a=strip_tags($a); print $a; ? 2 ? $a=font color=red这是一个带HTML标识的字串/font; ereg_replace(^.+$, , $a); pr...