title: Sort multidimensional array by multiple columns
body: <p>I'm trying to sort a multidimensional array by multiple keys, and I have no idea where to start. I looked at <code>uasort()</code>, but wasn't quite sure how to write a function for what I need.</p>
  <p>I need to sort by the <code>state</code>, then <code>event_type</code>, then <code>date_start</code>.</p>
  <p>My array looks like this:</p>
  <pre><code>[
      ['ID' =&gt; 1, 'title' =&gt; 'Boring Meeting',  'date_start' =&gt; '2010-07-30', 'event_type' =&gt; 'meeting', 'state' =&gt; 'new-york'],
      ['ID' =&gt; 2, 'title' =&gt; 'Find My Stapler', 'date_start' =&gt; '2010-07-22', 'event_type' =&gt; 'meeting', 'state' =&gt; 'new-york'],
      ['ID' =&gt; 3, 'title' =&gt; 'Mario Party',     'date_start' =&gt; '2010-07-22', 'event_type' =&gt; 'party',   'state' =&gt; 'new-york'],
      ['ID' =&gt; 4, 'title' =&gt; 'Duct Tape Party', 'date_start' =&gt; '2010-07-28', 'event_type' =&gt; 'party',   'state' =&gt; 'california']
  ]
  </code></pre>
  <p>My desired result is:</p>
  <pre><code>[
      ['ID' =&gt; 4, 'title' =&gt; 'Duct Tape Party', 'date_start' =&gt; '2010-07-28', 'event_type' =&gt; 'party',   'state' =&gt; 'california']
      ['ID' =&gt; 2, 'title' =&gt; 'Find My Stapler', 'date_start' =&gt; '2010-07-22', 'event_type' =&gt; 'meeting', 'state' =&gt; 'new-york'],
      ['ID' =&gt; 1, 'title' =&gt; 'Boring Meeting',  'date_start' =&gt; '2010-07-30', 'event_type' =&gt; 'meeting', 'state' =&gt; 'new-york'],
      ['ID' =&gt; 3, 'title' =&gt; 'Mario Party',     'date_start' =&gt; '2010-07-22', 'event_type' =&gt; 'party',   'state' =&gt; 'new-york'],
  ]
  </code></pre>