function Recurs(&$m){
$count = count($m);
if(is_array($m)){
foreach ($m as $key => $c){
if($key == 'flame'){
$m[$key] = 'xx';
}else{
Recurs($c);
};
};
}
return $m;
}
$result = Recurs($massive);
print_r($result);
function Recurs($m){
if(is_array($m)){
foreach ($m as $key => $c){
if($key == 'flame'){
$m[$key] = 'xx';
}else{
$m[$key] = Recurs($c);
}
}
}
return $m;
}
$result = Recurs($massive);
print_r($result);