I have two array
$arr1 = array(
'setting_one' => 'abc',
'setting_two' => 'def',
'setting_three' => 'test'
);
$arr2 = array(
'setting_two' => 'user defined'
);
$arr3= array();
I want $array3 to look like
array(
'setting_one' => 'abc';
'setting_two' => 'user defined',
'setting_three' => 'test'
);
how can i merge two arrays into a third array? Take into a real world example that the first two arrays are settings arrays, the first array is a global array while the second array is user defined settings. The third array is a combination of the two array while favoring the second array values over the global settings arrays.