title: Summing objects property in array
body: <p>I have an array of objects, and i want to sum value of one of the properties, example:    </p>
  
  <pre><code>Array
  (
  [0] =&gt; stdClass Object
      (
          [name] =&gt; jon
          [commission] =&gt; 5
  
      )
  [1] =&gt; stdClass Object
      (
          [name] =&gt; smith
          [commission] =&gt; 1
  
      )
  [2] =&gt; stdClass Object
      (
          [name] =&gt; philip
          [commission] =&gt; 8
  
      )
  )  
  </code></pre>
  
  <p>I want to sum all the commissions in the array, result should be 14.  </p>
  
  <p>What is a good way for this?</p>