How can I check if an array contains a specific value in php?

QuestionsHow can I check if an array contains a specific value in php?
sethbeckerman5 Staff asked 14 years ago

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:

and I would like do something like:

What is the best way to do the above?


View on Stack Overflow