close

 


說明
string mb_strcut (string $str, int $start [, int $length = NULL [, string $encoding = mb_internal_encoding() ]] )

str
要截斷的 string。

start
起始位置,以字節為單位。

length
字節長度。If omitted or NULL is passed, extract all bytes to the end of the string.

encoding
encoding 參數為字符編碼。如果省略,則使用內部字符編碼。



$string = "我想要測試一下再測試一下";
echo mb_strcut($string,0,15);

輸出:
我想要測試

arrow
arrow
    全站熱搜

    stockwfj3 發表在 痞客邦 留言(0) 人氣()