title: PHP merge (single depth) recursive based on first index (date)
body: <p>I have searched alot, but can't find the exact similair question. The built-in function in PHP don't do what I'm looking for. Note: array_merge_recursively(...) came close, but didn't keep the indexes.</p>
  
  <p>I have for example to arrays in PHP (json visualization):</p>
  
  <pre><code>[
      ["1-6-13", 10],
      ["30-6-13", 13],
      ["20-9-13", 28]
  ]
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>[
      ["18-2-13", 7],
      ["30-6-13", 9]
  ]
  </code></pre>
  
  <p>And I want to merge those two, based on their date. However not every date matches the other one, <strong>it is important that the value of array 1 will be on index 1, and the value of array 2 must be appended to index 2</strong>. The values which don't exists must be for instance null.</p>
  
  <p>So the desired result would look like:</p>
  
  <pre><code>[
      ["18-2-13", null, 7],
      ["1-6-13", 10, null],
      ["30-6-13", 13, 9],
      ["20-9-13", 28, null]
  ]
  </code></pre>
  
  <p>I hope someone can help me out!</p>