2015
01-30
01-30
PHP字符截取 支持UTF8/GBK
/***字符截取支持UTF8/GBK*@param$string*@param$length*@PHP新手www.phpxs.com*/functionstr_cut($string,$length,$dot='...'){$strlen=strlen($string);if($strlen<=$length)return$string;$string=str_replace(array('',' ','&','"',''','“','”','—','<','>','·','…'),array('∵','','&','"',"'",'“','”','—',...
继续阅读 >