You need to search the format string:
$string = "Lorem ipsum dolor sit amet"; The person enters the search "sit ipsum amet" . Is it possible to check the string for the presence of these characters in the string, not in direct order?
In php, there are standard methods for searching by string, for example stristr() , but it will work only if you give the data in the exact order, and I just need something to find a match in the string and query.
How can this be implemented?
preg_match('@(^|\s)'.preg_quote($word).'@i', ;$text). So you can find out at the same time the relevance, if there are a lot of objects to be compared. - Goncharov Alexander