function intercept($str,$length = 10){ if (strlen($str)>$length) $str=substr($str,0,$length) . '...'; return $str; }