PHP Source:
<!DOCTYPE html>
<html>
<body>

<?php
$a=array("Volvo"=>"XC90","BMW"=>"X5");
if (array_key_exists("Volvo",$a))
  {
  echo "Key exists!";
  }
else
  {
  echo "Key does not exist!";
  }
?>


</body>
</html>
Result:
Show PHP - © w3schools.com
Privacy Policy