I want to test a string to see it contains certain words.
i.e:
$string = "The rain in spain is certain as the dry on the plain is over and it is not clear";
preg_match('`\brain\b`',$string);
But that method only matches one word. How do I check for multiple words?
\s
around the words, but then I noticed you already used a word boundary\b
. – Hatchel