title: Combine multiple arrays
body: <p>I have arrays like this
  Array 1:</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  )
  </code></pre>
  
  <p>Array 2:</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  )
  </code></pre>
  
  <p>Array 3:</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  
  [3] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
      )
  )
  </code></pre>
  
  <p>and more of them.
  I want to combine them to this</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
          [2] =&gt; 0
          [3] =&gt; -0.025
          [4] =&gt; 0
          [5] =&gt; -0.025
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
          [2] =&gt; 0
          [3] =&gt; -0.025
          [4] =&gt; 0
          [5] =&gt; -0.025
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; -0.025
          [2] =&gt; 0
          [3] =&gt; 0
          [4] =&gt; 0
          [5] =&gt; -0.025
      )
  
  [3] =&gt; Array
      (
          [0] =&gt; 0
          [1] =&gt; 0
          [2] =&gt; 0 // These (0-3) are 0 because the other two arrays haven't 3 in the first level
          [3] =&gt; 0
          [4] =&gt; 0
          [5] =&gt; -0.025
      )
  )
  </code></pre>
  
  <p>The arrays have a different number of entries in the first level. In the second level there are always 2 entries.
  In the second level of the combined array the first two keys (0 and 1) should always have the entries from the first array. The second two keys (2 and 3) should always have the entries from the second array and so on. In my example there are 30 arrays that I want to combine.
  If an array does have more first level entries than others all entries should have 0 as value.</p>
  
  <p>I hope you understand this :)</p>