<?php echo mb_strlen($value['art_time'], 'utf-8') > 10 ? mb_substr($value['art_time'], 0, 10, 'utf-8').'...' :$value['art_time'] ; ?>
将需要截取的字段替换,替换限制长度就OK了!
<?php echo mb_strlen($value['art_time'], 'utf-8') > 10 ? mb_substr($value['art_time'], 0, 10, 'utf-8').'...' :$value['art_time'] ; ?>
将需要截取的字段替换,替换限制长度就OK了!