I have few list of words (needle) I want to find in a sentence (haystack). After a word is found, how would I echo that word? Is there a way to have a multi array so:
if the sentence contains word1,word2 or word3 then echo "coding"
if the sentence contains word4,word5 or word6 then echo "forums"
$title_of_the_item = "This would be the sentence being pulled.";
$words_from_title = explode(" ", $title_of_the_item);
$word = array("structure", "php", "sentence", "pulled");
//even though two words are found in the array, use only 1