PHP preg_match words in changing order

Supposing I have an array ("things and stuff", "the stuff"); that I am iterating through to compare each element to each element of another array – assume the second array is ("stuff the blah", "stuff and things to do");

And I want to preg_match anything that is generally relevant – I need it to match elements wherein the words are the same, even though their position has been changed – essentially I want "the stuff" to match "stuff the..." in this case.

What’s the best way to go about this?

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories