include('dblib/db_connect.php'); function truncate($string, $max = 55, $rep = '...') { $leave = $max - strlen ($rep); return substr_replace($string, $rep, $leave); } ?>