<?php
function findKey($array, $keySearch){
$return = '';
foreach ($array as $key => $item) {
if ($key == $keySearch) {
$return = $item;
}else{
if (is_array($item) && findKey($item, $keySearch)) {
$return = true;
}
}
}
return $return;
}
$fruits = array ( "frutas" => array ( "a" => "laranja",
"b" => "banana",
"c" => "maçã",
),
"numeros" => array ( "1" => "Um",
"2" => "Dois",
"3" => "Tres",
"4" => "Quatro",
"5" => "Cinco",
"6" => "Seis"
),
);
print_r(findKey($fruits, "a"));
?>