title: PHP Sort array with key value
body: <p>I'm breaking my head to sort array with key value. With this following array i need to sort this by <strong>site_category</strong> and i need to have output like</p>
  
  <p>Example:</p>
  
  <pre><code>Shopping
     Amazon
  Social
     Amoeblo
     American express
  </code></pre>
  
  <p>
  Array values are</p>
  
  <pre><code>(
      [0] =&gt; stdClass Object
          (
              [site_id] =&gt; 1
              [site_name] =&gt; Amazon
              [site_img] =&gt; http://localhost/faves/resource/img/sites/icon/amazon.png
              [site_category] =&gt; Shopping
          )
  
      [1] =&gt; stdClass Object
          (
              [site_id] =&gt; 2
              [site_name] =&gt; Ameblo
              [site_img] =&gt; http://localhost/faves/resource/img/sites/icon/ameblow.png
              [site_category] =&gt; Social
          )
  
      [2] =&gt; stdClass Object
          (
              [site_id] =&gt; 3
              [site_name] =&gt; American Express
              [site_img] =&gt; http://localhost/faves/resource/img/sites/icon/americanexpress.png
              [site_category] =&gt; Social
          )
  
  
  )
  </code></pre>
  
  <p>Any suggestion to solve this?</p>