//过滤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); }
原文:http://www.cnblogs.com/OnlyLoveCx/p/5163843.html