Jump to content

[SOLVED] If word matches on in array


Mutley

Recommended Posts

Simple concept, just can't find the function for it.

 

$word = 'melon';

$list = array('apple', 'peach', 'carrot', 'lemon');

if($word == $list){  // But this wouldn't work, I presume I need a function to check the words in the array?

echo 'yes';

}else{

echo 'no';

}

 

Thanks in advance,

Nick.

Link to comment
https://forums.phpfreaks.com/topic/158469-solved-if-word-matches-on-in-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.