php html转换成text文本函数
文章为各位提供一个哦,如果喜欢就行了。
)
{
$start = 1;
}
else if($start==1)
{
if($str[$i]== {
$start = 0;
$alltext .= ;
}
else if(ord($str[$i])>31)
{
$alltext .= $str[$i];
}
}
}
$alltext = str_replace( , ,$alltext);
$alltext = preg_replace(/&([^;&]*)(;|&)/,,$alltext);
$alltext = preg_replace(/[ ]+/s, ,$alltext);
return $alltext;
}
?>