title: Difficulties in merging two array in PHP
body: <p>I have two arrays, I want to merge these two arrays into single array. Please view the detail below:</p>
  
  <p>First Array:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [a] =&gt; 1
              [b] =&gt; 2
              [c] =&gt; 3
          )
  
      [1] =&gt; Array
          (
              [a] =&gt; 4
              [b] =&gt; 5
              [c] =&gt; 6
          )
      [2] =&gt; Array
          (
              [a] =&gt; 7
              [b] =&gt; 8
              [c] =&gt; 9
          )
  )
  </code></pre>
  
  <p>Second Array:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [d] =&gt; 100
  
          )
  
      [1] =&gt; Array
          (
              [d] =&gt; 200
  
          )
      [2] =&gt; Array
          (
              [d] =&gt; 300
  
          )
  )
  </code></pre>
  
  <p>I want this result. Does somebody know how to do this?</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [a] =&gt; 1
              [b] =&gt; 2
              [c] =&gt; 3
              [d] =&gt; 100
          )
  
      [1] =&gt; Array
          (
              [a] =&gt; 4
              [b] =&gt; 5
              [c] =&gt; 6
              [d] =&gt; 200
          )
      [2] =&gt; Array
          (
              [a] =&gt; 7
              [b] =&gt; 8
              [c] =&gt; 9
              [d] =&gt; 300
          )
  
      )
  </code></pre>
  
  <p>Hope you have understand the question. Thank you in advance.</p>
  
  <p>EDIT: When i use array_merge_recursive(), i get this result: </p>
  
  <pre><code>Array
      (
      [0] =&gt; Array
          (
              [a] =&gt; 1
              [b] =&gt; 2
              [c] =&gt; 3
          )
  
      [1] =&gt; Array
          (
              [a] =&gt; 4
              [b] =&gt; 5
              [c] =&gt; 6
          )
      [2] =&gt; Array
          (
              [a] =&gt; 7
              [b] =&gt; 8
              [c] =&gt; 9
          )
  
      [3] =&gt; Array
          (
              [d] =&gt; 100
  
          )
  
      [4] =&gt; Array
          (
              [d] =&gt; 200
  
          )
      [5] =&gt; Array
          (
              [d] =&gt; 300
  
          )
  )
  </code></pre>
  
  <p>Help!</p>