public function highlight($text, $words, $min = 3)
    {
        $words = AnConfig::unbox($words);
        settype($words, 'array');
        foreach ($words as $word) {
            if (strlen($word) >= $min) {
                $text = AnHelperString::str_ireplace($word, '<span class="an-text-highlight">'.$word.'</span>', $text);
            }
        }

        return $text;
    }
public function highlight($text, $words, $min = 3)
    {
        $words = AnConfig::unbox($words);
        settype($words, 'array');
        foreach ($words as $word) {
            if (strlen($word) >= $min) {
                $text = AnHelperString::str_ireplace($word, '<span class="an-text-highlight">'.$word.'</span>', $text);
            }
        }

        return $text;
    }
public function highlight ( $ text , $ words , $ min = 3 ) { $ words = AnConfig :: unbox ( $ words ) ; settype ( $ words , 'array' ) ; foreach ( $ words as $ word ) { if ( strlen ( $ word ) >= $ min ) { $ text = AnHelperString :: str_ireplace ( $ word , '<span class="an-text-highlight">' . $ word . '</span>' , $ text ) ; } } return $ text ; }
wraps the provided keywords in a text with span tags containing the highlight css tag.

@param string $text
@param array  $words

@return string of processed text
wraps the provided keywords in a text with span tags containing the highlight css tag .