<?php
function truncate($text, $length=100, $end = '...')
{
if(strlen($text) > $length) {
$text = substr($text, 0, $length) . $end;
}
return $text;
}
?>
<?php
function truncate($text, $length=100, $end = '...')
{
if(strlen($text) > $length) {
$text = substr($text, 0, $length) . $end;
}
return $text;
}
?>