$myArray = array('key1' => '', 'key2' => '');$keys = array('key1', 'key2', 'key3');$keyExists = count(array_intersect($keys, array_keys($myArray)));
Will return true, because there are keys from $keys array in $myArray
$myArray = array('key1' => '', 'key2' => '');$keys = array('key1', 'key2', 'key3');$keyExists = count(array_intersect($keys, array_keys($myArray)));
Will return true, because there are keys from $keys array in $myArray