title: How can i print array according to the highest value of [num_of_offers] column?
body: <p>How can I sort this array by the value of the "num_of_offers" key? Currently i am getting array like this:</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( 
                          [ID] =&gt; 1 
                          [post_title] =&gt; abc 
                          [num_of_offers] =&gt; 0 
                          [offer_amt] =&gt; 12 
                         ) 
          [1] =&gt; stdClass Object ( 
                          [ID] =&gt; 2 
                          [post_title] =&gt; xyz 
                          [num_of_offers] =&gt; 1 
                          [offer_amt] =&gt; 12 
                         ) 
          [2] =&gt; stdClass Object ( 
                          [ID] =&gt; 3 
                          [post_title] =&gt; wxy 
                          [num_of_offers] =&gt; 2 
                          [offer_amt] =&gt; 17 
                         ) 
           [3] =&gt; stdClass Object ( 
                           [ID] =&gt; 4 
                           [post_title] =&gt; wxy 
                           [num_of_offers] =&gt; 2 
                           [offer_amt] =&gt; 44 
                          ) 
            )
  </code></pre>
  
  <p>But i want array like this:</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( 
                    [ID] =&gt; 5 
                    [post_title] =&gt; wxy 
                    [num_of_offers] =&gt; 2 
                    [offer_amt] =&gt; 44 
                   ) 
           [1] =&gt; stdClass Object ( 
                    [ID] =&gt; 3
                    [post_title] =&gt; wxy 
                    [num_of_offers] =&gt; 2 
                    [offer_amt] =&gt; 17 
                   ) 
           [2] =&gt; stdClass Object ( 
                    [ID] =&gt; 2 
                    [post_title] =&gt; xyz 
                    [num_of_offers] =&gt; 1 
                    [offer_amt] =&gt; 12 
                   ) 
            [3] =&gt; stdClass Object ( 
                    [ID] =&gt; 1 
                    [post_title] =&gt; abc 
                    [num_of_offers] =&gt; 0 
                    [offer_amt] =&gt; 12 
                   ) 
      )
  </code></pre>