With this function you can filter a multidimensional array
function filter_array_keys($array,$filter_keys=array()){
$l=array(&$array);
$c=1;
//This first loop will loop until the count var is stable//
for($r=0;$r<$c;$r++){
//This loop will loop thru the child element list//
$keys = array_keys($l[$r]);
for($z=0;$z<count($l[$r]);$z++){
$object = &$l[$r][$keys[$z]];
if(is_array($object)){
$i=0;
$keys_on_array=array_keys($object);
$object=array_filter($object,function($el) use(&$i,$keys_on_array,$filter_keys){
$key = $keys_on_array[$i];
$i++;
if(in_array($key,$filter_keys) || is_int($key))return false;
return true;
});
}
if(is_array($l[$r][$keys[$z]])){
$l[] = &$l[$r][$keys[$z]];
$c++;
}//IF
}//FOR
}//FOR
return $l[0];
}