$html = preg_replace('/src="(https?:\\/\\/)?([^"]+)"/', 'src="https://\\2"', $html);
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);