title: Sort array of objects by one property
body: <p>How can I sort this array of objects by one of its fields, like <code>name</code> or <code>count</code>?</p>
  <pre><code>Array
  (
      [0] =&gt; stdClass Object
          (
              [ID] =&gt; 1
              [name] =&gt; Mary Jane
              [count] =&gt; 420
          )
  
      [1] =&gt; stdClass Object
          (
              [ID] =&gt; 2
              [name] =&gt; Johnny
              [count] =&gt; 234
          )
  
      [2] =&gt; stdClass Object
          (
              [ID] =&gt; 3
              [name] =&gt; Kathy
              [count] =&gt; 4354
          )
  
     ....
  </code></pre>