How to prevent renumbering a result of assoc_merge?
<p>I use array_merge function for merging two arrays.
In most case it works properly</p>

<pre><code>$x = array_merge(array('a' =&gt; 'x', 'b' =&gt; 'x'), array('b' =&gt; 'y', 'c' =&gt; 'y'));
var_dump($x);

// array(3) { ["a"]=&gt; string(1) "x" ["b"]=&gt; string(1) "y" ["c"]=&gt; string(1) "y" }
</code></pre>

<p>But for numeric case it returns unexpected result</p>

<pre><code>$x = array_merge(array('1' =&gt; 'x', '2' =&gt; 'x'), array('2' =&gt; 'y', '3' =&gt; 'y'));
var_dump($x);

// array(4) { [0]=&gt; string(1) "x" [1]=&gt; string(1) "x" [2]=&gt; string(1) "y" [3]=&gt; string(1) "y" }
</code></pre>

<p>How to prevent renumbering of indexes?
There is way to merge two arrays by base php functions without renumbering of numeric indexes?</p>
