Hi guys,
I'm trying to use preg_match to search a string, and see how many times parts of another string appear in it.
Right now, i have this:
$sentance = "Try new Adobe Flash Builder 4.5 FREE for 60 days";
$Search_Query = "adobe";
preg_match("/\b$Search_Query\b/i", $sentance)
This works, because adobe is in the sentance.
What i want, is the user to be able to enter multiple words, and still get a match, like this:
The user enters: "adobe free trial" as the search query,
And it matches, because the words "adobe" and "free" are in $sentance.
If it could also count how many matchs have been found in $sentance -- that would be even better.
I'm really sorry about my example, i hope someone understands what i'm trying to do --- it's difficult for me to explain 🙁
Thanks for your help!