title: Compare array lists with the next one in an array
body: <p>I would like to compare lists with others in order to merge if their numbers (id_article) are the same.
  In my example, I would like to obtain this final array list :</p>
  
  <p>*<strong><em>Final *</em></strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id_article] =&gt; 1
              [quantite] =&gt; 5
          )
  
      [1] =&gt; Array
          (
              [id_article] =&gt; 3
              [quantite] =&gt; 1
          )
  
  }
  </code></pre>
  
  <p><strong>INITIAL</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id_article] =&gt; 1
              [quantite] =&gt; 2
          )
  
      [1] =&gt; Array
          (
              [id_article] =&gt; 1
              [quantite] =&gt; 3
          )
  
      [2] =&gt; Array
          (
              [id_article] =&gt; 3
              [quantite] =&gt; 1
          )
  
  )
  </code></pre>
  
  <p>I tried with next() and current() but didn't work in this case.</p>
  
  <p>Thanks in advance for help, advice or others examples.</p>