PHP function to checks whether given key or index exists in the array – PHP May 11, 2011 Pramod T P Leave a comment <?php $search_array = array('key1' => 17, 'key2' => 74); if (array_key_exists('key1', $search_array)) { echo "The key 'key1' exists "; } //The key 'key1' exists ?>