title: Summing for values in my array
body: <p>I have an array like below, and I want to do the total of values in a specific manner where all values of ADDED_NEW_(.*) {regular expressions}, and similarly other values.
  I have only specific vals like ADDED_NEW, ADDED_OLD, and ADD_LATER.</p>
  
  <p>My array is like:</p>
  
  <pre><code>$stats = Array
  (
      [ADDED_NEW_2012_06_12] =&gt; 16
      [ADDED_OLD_2012_06_12] =&gt; 10
      [ADD_LATER_2012_06_12] =&gt; 12
      [ADDED_NEW_2012_06_11] =&gt; 16
      [ADDED_OLD_2012_06_11] =&gt; 10
      [ADD_LATER_2012_06_11] =&gt; 12
  )
  </code></pre>
  
  <p>Can you please tell me how can i obtain my result. I don't know how to add such values using regex in php. Please help.</p>
  
  <p>The output I am expecting is $ADDED_NEW = 32 (i.e. 16+16), $ADDED_OLD = 20 (i.e. 10+10) and $ADD_LATER = 24 (i.e. 12+12)</p>