Home >Backend Development >PHP Tutorial >PHP Chinese string interception (mb_substr) example
Output: Programmer's Home 2. Get the Chinese length: mb_strlen() mb_strlen( $str, $encoding ) $str, the string whose length is to be calculated $encoding, web page encoding, such as utf-8, GB2312, GBK Example 2:
Output: 24 |