Basically, I have an array of keywords, and a piece of text. I am wondering what would be the best way to find out if any of those keywords are present in the text, bearing in m
I really don't know if it is more efficient, but you could try to put them all in a regex like this:
(keyword1|keyword2|...)
With the preg_quote function you can escape the keywords for the regex. If you set the compiled option, it might be more efficient when using it with multiple strings.