title: How to compare and later merge two multidimensional arrays
body: <p>I am trying to merge two multidimensional arrays in following way (example arrays are only examples, real ones are very long and have thousands of items):</p>
  
  <p>$array_a:</p>
  
  <pre><code>[0] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:12
          [request] =&gt; 0
      )
  [1] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:13
          [request] =&gt; 0
      )
  [2] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:14
          [request] =&gt; 0
      )
  [3] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:15
          [request] =&gt; 0
      )
  </code></pre>
  
  <p>$array_b:</p>
  
  <pre><code>[0] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:12
          [request] =&gt; 11
      )
  [1] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:13
          [request] =&gt; 5
      )
  [2] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:15
          [request] =&gt; 2
      )
  </code></pre>
  
  <p>Needed result:</p>
  
  <pre><code>[0] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:12
          [request] =&gt; 11
      )
  [1] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:13
          [request] =&gt; 5
      )
  [2] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:14
          [request] =&gt; 0
      )
  [3] =&gt; Array
      (
          [date] =&gt; 2018-02-25 15:15
          [request] =&gt; 2
      )
  </code></pre>
  
  <p>Any? Thanks.</p>