how to add 3 dots to a string that is too long code example
Example 1: php ellipsis
$out = strlen($in) > 50 ? substr($in,0,50)."..." : $in;
Example 2: php trim string if longer than
substr($str,0,50);
$out = strlen($in) > 50 ? substr($in,0,50)."..." : $in;
substr($str,0,50);