title: Get distinct sum from an php array
body: <p>I have an array like this:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [url_id] =&gt; 1
              [time_spent] =&gt; 41
          )
  
      [1] =&gt; Array
          (
              [url_id] =&gt; 2
              [time_spent] =&gt; 25
          )
      [2] =&gt; Array
          (
              [url_id] =&gt; 1
              [time_spent] =&gt; 41
          )
  )
  </code></pre>
  
  <p>So, how to get the 'distinct' of time_spent and also the 'sum' of the time_spent.</p>
  
  <p>Thanks.  </p>