PHP去除Html所有标签、空格以及空白

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/helin916012530/article/details/42522731
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);
}

展开阅读全文

没有更多推荐了,返回首页