This is a function that truncates input in a rather different way if I'm correct.
(I've never seen it done this way)
Usage: getTrunc("String",LENGTH);
What it does is first truncates the string the the given length, then explodes into an array by spaces, finally it removes the last key and impodes into a string.
function getTrunc($n, $l) {
if ($l >= strlen($n)) { return $n; }
$n = explode(' ', substr($n, 0, $l));
if (count($n)>1) { unset($n[count($n)-1]); }
return implode(' ', $n).'...';
}