Limit Character / String Display With Fake Ellipsis
Copy this code and paste it in your HTML
function stringDisplay($str, $charLimit) {
if(strlen($str) > $charLimit) return substr($str, 0, $charLimit).'...'; return $str;
}
Report this snippet
Comments
Subscribe to comments