$minword && strlen($sub) >= $length) break; } return $sub . (($len < strlen($str)) ? '...' : ''); } ?>