'; $res .= substr($str,$offset,$count); $chars += 1; $offset += $count; } return $res; } $str = '你好aaaaa'; echo cutstr($str,2); ?>