php过滤HTML,空格,换行,截取,编码,

//过滤HTML,空格,换行,截取,编码, 

function my_nohtml_mbsubstr($str,$start=0,$end=50,$coded='utf-8'){
	$str=strip_tags($str);
	$bf=array(" "," ","\t","\n","\r");
	$lb=array("","","","","");
 	$str=str_replace($bf,$lb,$str);
	return $str=mb_substr($str,$start,$end,$coded);
}

 

你可能感兴趣的:(php过滤HTML,空格,换行,截取,编码,)