public static function shortenWordsByChar($input, $num_chars = 35, $hellip = '&nbsp;&hellip;')
    {
        if (strlen($input) <= $num_chars) {
            return $input;
        }

        $shortened = substr($input, 0, $num_chars);
        $shortened_words = array_filter(explode(' ', $shortened));
        end($shortened_words);
        $last_key = key($shortened_words);

        $words = explode(' ', $input);
        $words = array_slice($words, 0, $last_key + 1);
        if ($words[$last_key] !== $shortened_words[$last_key]) {
            unset($words[$last_key]);
        }
        return join(' ', $words) . $hellip;
    }