title: Using usort on a php object not working
body: <p>I cant seem to get this function to sort properly. Here is my code:</p>
  
  <pre><code>    function cmpPriceDesc($a, $b)   {
          return strcmp($a-&gt;product_price, $b-&gt;product_price);
       }
  
       usort($this-&gt;products, "cmpPriceDesc");
  </code></pre>
  
  <p>Is returning the following:</p>
  
  <pre><code>Array
      (
  [0] =&gt; stdClass Object
      (
          [virtuemart_manufacturer_id] =&gt; 2
          [mf_name] =&gt; Karl
          ...
          [product_price]=&gt; 127.445
      )
   [1] =&gt; stdClass Object
      (
          [virtuemart_manufacturer_id] =&gt; 7
          [mf_name] =&gt; Karl
          ...
          [product_price]=&gt; 13.445
      )
    [2] =&gt; stdClass Object
      (
          [virtuemart_manufacturer_id] =&gt; 5
          [mf_name] =&gt; Karl
          ...
          [product_price]=&gt; 13.445
      )
    [3] =&gt; stdClass Object
      (
          [virtuemart_manufacturer_id] =&gt; 11
          [mf_name] =&gt; Karl
          ...
          [product_price]=&gt; 18.000
      )
  </code></pre>
  
  <p>As you can see the the product price is not going from high to low. Any ideas as to why?</p>