Has anyone an idea how to replace the shortcuts in first array with values from second array?
$first_array = [
'product 1' => ['name 1', 'shortcut 1'],
'product 2' => ['name 2', 'shortcut 2']
];
$second_array = [
'product 1' => ['shortcut 1' => 'text 1'],
'product 2' => ['shortcut 2' => 'text 2']
];
// Do not work.
$new_array = array_replace($first_array, $second_array);
I Need output like this
$new_array = [
'product 1' => ['name 1' => 'text 1'],
'product 2' => ['name 2' => 'text 2']
]