title: Merging arrays with different dimensions in PHP
body: <p>I have 2 different arrays with different dimensions  that i need to merge in order to get a result with a specific this structure:</p>
  
  <p>the first:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; 2017-11-03
              [1] =&gt; 2017-11-05
              [2] =&gt; 1
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; 2017-11-23
              [1] =&gt; 2017-11-25
              [2] =&gt; 1
          )
  
  )
  </code></pre>
  
  <p>The second:</p>
  
  <pre><code>Array
  (
      [0] =&gt; 2017-12-26
      [1] =&gt; 2018-01-30
  )
  </code></pre>
  
  <p>The result should be :</p>
  
  <pre><code>Array
      (
          [0] =&gt; Array
              (
                  [0] =&gt; 2017-11-03
                  [1] =&gt; 2017-11-05
                  [2] =&gt; 1
              )
  
          [1] =&gt; Array
              (
                  [0] =&gt; 2017-11-23
                  [1] =&gt; 2017-11-25
                  [2] =&gt; 1
              )
  
          [2] =&gt; Array
              (
                  [0] =&gt;2017-12-26
                  [1] =&gt; 2018-01-30
                  [2] =&gt; 1
              )
  
      )
  </code></pre>
  
  <p>I tried using array_merge but it does not work because they have not the same dimension. Also I need an element in the second tab ([2] => 1).</p>