<?php $str = $row['title']; $lenth = strlen($str); if($lenth>=48){ $str = substr($str,0,42)."...";}echo $str;?>php