Ограничьте синтаксис строки
<?php
$string = "How to Limit Characters to Display in a String using PHP";
echo substr($string, 0, 30);
?>
Zealous Zebra
<?php
$string = "How to Limit Characters to Display in a String using PHP";
echo substr($string, 0, 30);
?>
<?php
$string = "How to Limit Characters to Display in a String using PHP";
echo substr_replace($string, '...', 25);
?>