php - preg_match for multiple words - Stack Overflow
preg_match('~\b(rain|dry|certain|clear)\b~i',$string); You can use the pipe character (|) as an "or" in a regex. If you just need to know if any of the words is present, use preg_match as above. If you need to match all the occurences of any of th...