title: Push elements from one array into rows of another array (one element per row)
body: <p>I need to push elements from one array into respective rows of another array.</p>
  <p>The 2 arrays are created from <code>$_POST</code> and <code>$_FILES</code> and I need them to be associated with each other based on their indexes.</p>
  <pre><code>$array1 = [
      [123, &quot;Title #1&quot;, &quot;Name #1&quot;],
      [124, &quot;Title #2&quot;, &quot;Name #2&quot;],
  ];
  
  $array2 = [
      'name' =&gt; ['Image001.jpg', 'Image002.jpg']
  ];
  </code></pre>
  <p>New Array</p>
  <pre><code>array (
    0 =&gt; 
    array (
      0 =&gt; 123,
      1 =&gt; 'Title #1',
      2 =&gt; 'Name #1',
      3 =&gt; 'Image001.jpg',
    ),
    1 =&gt; 
    array (
      0 =&gt; 124,
      1 =&gt; 'Title #2',
      2 =&gt; 'Name #2',
      3 =&gt; 'Image002.jpg',
    ),
  )
  </code></pre>
  <p>The current code I'm using works, but only for the last item in the array.<br>
  I'm presuming by looping the <code>array_merge</code> function it wipes my new array every loop.</p>
  <pre><code>$i = 0;
  $NewArray = array();
  foreach ($OriginalArray as $value) {
      $NewArray = array_merge($value, array($_FILES['Upload']['name'][$i]));
      $i++;
  }
  </code></pre>
  <p>How do I correct this?</p>