I have a PHP variable of type Array and I would like find out if it contains a specific value and let the user know that it is there. This is my array:
Array ( [0] => kitchen [1] => bedroom [2] => living_room [3] => dining_room)
and I would like do something like:
if(Array contains 'kitchen') {echo 'this array contains kitchen';}
What is the best way to do the above?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…