I have three arrays:
$arr_1 = array('a'=>1,'b'=>2);
$arr_11 = array('a'=>1, 'd'=>4);
$arr_2 = array('a'=>'aaa','b'=>'bbb', 'c'=>'ccc');
I want to check that all keys from $arr_1 exist in $arr_2.
someFunction($arr_1,$arr_2); //return true
someFunction($arr_11,$arr_2); //return false
I know how to do it with a "foreach" loop.
Is there a better way?
array_diff()except the comparison is done on the keys instead of the values.