I have two arrays
$setWords = array ('one','two','three');
$setSentences = array('There is one cloud in the sky', 'A dog has four legs' , 'There are three cars parked outside');
I tried the following but it didn't work.
if(array_intersect($setWords , $setSentences) == true) {
print_r($setSentences);
}
In this case it would be There is one cloud in the sky
and There are three cars parked outside
.