How to check if a key exists in array, but it can be multiple key?
I meant:
$a['b'] = 'Im exists!';
var_dump (isset($a['b']));
but my case is a but complicated:
$a['c'] = 'c';
$a['xxc'] = 'value';
$a[2][4] = 'more complex!';
$a['b']['d']['g'] = 4;
at this point, isset() wont work, but neither array_key_exists. Then how to check, if I want to know if [2][4] exists, or [‘b’][‘d’][‘g’] does?
It was an interesting problem to solve, here you go:
Usage:
key_exists_recursive(array('c'), $a);