I'm trying to take 2 pieces of text in php like this...
"A cat jumped over the hat"
"The mad hatter jumped over his cat"
For this problem, I'd use
explode to separate each string into words, then create an array for each string where the keys are the words, and the values all just
true. Then, you can take one of the arrays, loop through its keys, and check whether they're present in the other array.