title: PHP Adding Values With The Same ID's
body: <p>Here's another PHP one for you all!</p>
  
  <p>I have two arrays coming from two tables that have the same columns name but different values. I have created a query that call on both tables to dump the data into arrays. The values I get are: -</p>
  
  <pre><code>Array {
      [0] {
          [id] =&gt; 23,
          [count] =&gt; 300
      },
      [1] {
          [id] =&gt; 43,
          [count] =&gt; 400
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Array {
      [0] {
          [id] =&gt; 43,
          [count] =&gt; 200
      },
      [1] {
          [id] =&gt; 78,
          [count] =&gt; 55
      }
  }
  </code></pre>
  
  <p>What I want to do is this: -</p>
  
  <pre><code>Array {
      [0] {
          [id] =&gt; 23,
          [count] =&gt; 300
      },
      [1] {
          [id] =&gt; 43,
          [count] =&gt; 600 &lt;---- Notice how this has been added together
      },
      [2] {
          [id] =&gt; 78,
          [count] =&gt; 55
      }
  }
  </code></pre>
  
  <p>How would I go about doing this?</p>