combine two arrays into a third array
<p>I have two array</p>

<pre><code>$arr1 = array(
    'setting_one' =&gt; 'abc',
    'setting_two' =&gt; 'def',
    'setting_three' =&gt; 'test'
);

$arr2 = array(
    'setting_two' =&gt; 'user defined'
);

$arr3= array();
</code></pre>

<p>I want <code>$array3</code> to look like</p>

<pre><code>array(
    'setting_one' =&gt; 'abc';
    'setting_two' =&gt; 'user defined',
    'setting_three' =&gt; 'test'
);
</code></pre>

<p>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.</p>
