中文截取无乱码

    /*
    *中文截取无乱码
    */
     function showsubstr_chinese($str, $start, $length = null) {  

          return join("",  array_slice( preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY), $start, $length));  

     }  
原文地址:https://www.cnblogs.com/hgj123/p/4544851.html