title: How to merge arrays with same key and different value in PHP?
body: <p>I have arrays similarly to these:</p>
  
  <pre><code>0 =&gt; Array ( [0] =&gt; Finance / Shopping / Food, [1] =&gt; 47 )            
  1 =&gt; Array ( [0] =&gt; Finance / Shopping / Food, [1] =&gt; 25 )                 
  2 =&gt; Array ( [0] =&gt; Finance / Shopping / Electronic, [1] =&gt; 190 ) 
  </code></pre>
  
  <p>I need to create one array with [0] as a key and [1] as value.<br>
  The tricky part is that if the [0] is same it add [1] to existing value.</p>
  
  <p>So the result I want is:</p>
  
  <pre><code>array ([Finance / Shopping / Food]=&gt; 72, [Finance / Shopping / Electronic] =&gt; 190);
  </code></pre>
  
  <p>thanks</p>