title: Merge multidimensional arrays loaded from csv files
body: <p>I have 2 arrays converted from csv files using <a href="https://code.google.com/p/php-csv-parser/" rel="nofollow">php-csv-parser</a>. This is the oldest file:</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; A Single Man
          [1] =&gt; Tom Ford
          [2] =&gt; 2009
          [3] =&gt; Somestring
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; Bram Stoker Dracula
          [1] =&gt; Francis F. Coppola
          [2] =&gt; 1992
          [3] =&gt; Somestring
      )
  )
  </code></pre>
  
  <p>This is the newest:</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array //this is a new record
      (
          [0] =&gt; A Single Man
          [1] =&gt; Tom Ford
          [2] =&gt; 1988
      )
  
  [1] =&gt; Array //this record already exists in oldest array
      (
          [0] =&gt; A Single Man
          [1] =&gt; Tom Ford
          [2] =&gt; 2009
      )
  
  [2] =&gt; Array //this record already exists but has a modify
      (
          [0] =&gt; Bram Stoker Dracula
          [1] =&gt; Francis Ford Coppola //modified string
          [2] =&gt; 1992
      )
  )
  </code></pre>
  
  <p>I want to create third "merged" array, that contains new records and modified strings taken from newer. Please note that i have to create a new record if <i>Array[i][2]</i> are different strings, but simply modify the record if any other parameter changes. Afterwards for each new record i have to fill all other empty parameters.</p>
  
  <p>That's the expected output</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; A Single Man
          [1] =&gt; Tom Ford
          [2] =&gt; 1988
          [3] =&gt; //empty for now, to fill
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; A Single Man
          [1] =&gt; Tom Ford
          [2] =&gt; 2009
          [3] =&gt; Somestring
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; Bram Stoker Dracula
          [1] =&gt; Francis Ford Coppola
          [2] =&gt; 1992
          [3] =&gt; Somestring
      )
  )
  </code></pre>