Mutley Posted May 17, 2009 Share Posted May 17, 2009 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. Quote Link to comment Share on other sites More sharing options...
Dathremar Posted May 17, 2009 Share Posted May 17, 2009 This is what You are looking for http://www.php.net/manual/en/function.in-array.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.