时间:2021-07-01 10:21:17 帮助过:29人阅读
function cutstr_html($string, $sublen){
$string = strip_tags($string);
$string = trim($string);
$string = ereg_replace("\t","",$string);
$string = ereg_replace("\r\n","",$string);
$string = ereg_replace("\r","",$string);
$string = ereg_replace("\n","",$string);
$string = ereg_replace(" ","",$string);
return trim($string);
}相关推荐:
解决php使用strip_tags()去除html标签后仍有空白的方法
php去除html标签函数——strip_tags和htmlspecialchars
php去除html标签代码
以上就是PHP如何去除Html所有标签、空格以及空白的详细内容,更多请关注Gxl网其它相关文章!