title: PHP usort function multiple criteria sorting
body: <p>Hello I have a multidimensional array and the last "nested array" holds one more level of arrays. I want to sort all the arrays in this level by 2 keys
  1. "Enabled" - (int value - DESC)
  2. "Order" - (int value - ASC)</p>
  
  <p>I have a working function that only sorts by the "order" key but I want it to check for the "Enabled" key as well. </p>
  
  <p>Here's what I currently have:</p>
  
  <pre><code>         function sorter($item1,$item2)
          {
              if($item1['order'] == $item2['order']) return 0;
              return ($item1['order'] &gt; $item2['order']) ? -1 : 1;
          }
           uasort($array['level1']['level2']['level3'],'sorter');
  </code></pre>
  
  <p>Can someone help me out? Thanks in advance :)</p>