Without a loop, you will simply have to check each keyword individually. I would suggest dropping the entire functionality to a function so it can quickly be re-used.
if (preg_match("[word1|word2]","this has word1 or word2 in it")) {
echo "Detected";
} else {
echo "Not Detected";
}
this will show "Detected" if one or the other (or both) words in the pattern are matched.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?