2011-09-06 38 views

回答

5
substr($commentt, 0, 126); 

如果字符串可能包含多字節字符(UTF-8等),使用:

mb_substr($commentt, 0, 126, 'UTF-8');