See if Value Exists in PHP Array

in_array() is the function to Check if a value exists in an array using PHP. Here is an example of how it is used: –

$array = array("IN", "US", "UK", "AUS");
if (in_array("IN", $array)) {
echo "

IN is in array!

"; }

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

DMCA.com Protection Status