array_key_exists

It  checks if the given key or index exists in the array

Example

<?php
$array = array(‘PHP’ => 1, ‘JSP’ => 4);
if (array_key_exists(‘PHP’, $array)) echo “The ‘PHP’ element is in the array”;
?>

Output

The ‘PHP’ element is in the array