title: how to get sum of two arrays with same key in foreach
body: <p>how can i get the sum of two array with same key? if i am right. My goal here is to get the total hours from two arrays, And how can i make this foreached array jump into the next value of the array if it.</p>
  
  <p>I have this foreach loop:</p>
  
  <pre><code>&lt;?php foreach($unique_date as $unique_dates){
  
  }?&gt;
  </code></pre>
  
  <p>Aaaand below the foreach there's this code(because i want to see the arrays):</p>
  
  <pre><code>&lt;?php $arrayName = array(
                       'unique' =&gt; $unique_date
                      );
  var_dump($arrayName);
   ?&gt;
  </code></pre>
  
  <p>the result was this: </p>
  
  <pre><code>array (size=1)
    'unique' =&gt; 
      array (size=2)
        0 =&gt; 
          array (size=9)
            'id' =&gt; string '1' (length=1)
            'emp_id' =&gt; string '600064' (length=6)
            'dtr_date' =&gt; string '2015-05-01' (length=10)
            'dtr_time' =&gt; string '276200' (length=6)
            'timediffs' =&gt; string '09:18:00' (length=8)
            'status' =&gt; string 'in' (length=2)
            'emp_fname' =&gt; string 'Jim' (length=3)
            'emp_mname' =&gt; string 'Ramos' (length=5)
            'emp_lname' =&gt; string 'Salem' (length=5)
        1 =&gt; 
          array (size=9)
            'id' =&gt; string '3' (length=1)
            'emp_id' =&gt; string '600064' (length=6)
            'dtr_date' =&gt; string '2015-05-04' (length=10)
            'dtr_time' =&gt; string '256000' (length=6)
            'timediffs' =&gt; string '11:00:00' (length=8)
            'status' =&gt; string 'In' (length=2)
            'emp_fname' =&gt; string 'Jim' (length=3)
            'emp_mname' =&gt; string 'Ramos' (length=5)
            'emp_lname' =&gt; string 'Salem' (length=5)
  </code></pre>
  
  <p>what i want was something like this:
  for example:
   $time1 = $unique_dates['timediffs'](which suppose to have the value of '09:18:00') and
  $time2 = $unique_dates['timediffs'](which also suppose to have the value of '11:00:00') </p>
  
  <p>i want to add the two variables $result = $time1+$time2;</p>
  
  <p>but i dont know how because what i always get was the value of $time1</p>