Does anyone how to cut a long string by words?

function wordCut($c, $l) 
{
  $c= explode(' ',$c);
  for($i=0; $i<$l; $i++) $r[$i] = $c[$i];
  $r= implode(' ', $r).'...';
  return $r;
}