php截取漢字長(zhǎng)度可以使用函數(shù)mb_substr(),
codelayui.code
- echo mb_substr("程序猿",0,2)
- // 程序
語(yǔ)法
codelayui.code
- mb_substr ( string $str , int $start [, int $length = NULL [, string $encoding = mb_internal_encoding() ]] ) : string
codelayui.code
codelayui.code
codelayui.code
codelayui.code
codelayui.code
codelayui.code
codelayui.code
codelayui.code
codelayui.code
php截取漢字長(zhǎng)度可以使用函數(shù)mb_substr(),
codelayui.code
- echo mb_substr("程序猿",0,2)
- // 程序
codelayui.code
- mb_substr ( string $str , int $start [, int $length = NULL [, string $encoding = mb_internal_encoding() ]] ) : string
非特殊說(shuō)明,本博所有文章均為博主原創(chuàng)。
如若轉(zhuǎn)載,請(qǐng)注明出處:http://m.yhwxcd369.com/view/115.html