How to use preg_match with multiple words in PHP?
Question ID: 10
I want to search for multiple words in a string using PHP's preg_match() function. Here's what I'm trying: $string = "white red green blue"; $pattern = "/red, blue/"; echo preg_match($pattern, $st...
1 Answer
135 Views
13 Votes
Imran Nadwi
Asked by Imran Nadwi
2 years ago