title: Sort Month-Year multidimensional array in PHP using uksort
body: <p>I want to sort the following array:</p>
  
  <pre><code>Array(
      [05/2017] =&gt; Array (
          [city] =&gt; 'ABC'
          [memebers] =&gt; '50'
      )
      [03/2017] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '25'
      )
      [10/2016] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '20'
      )
      [11/2017] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '65'
      )
  )
  </code></pre>
  
  <p>The expected result:</p>
  
  <pre><code>Array(
      [10/2016] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '20'
      )
      [03/2017] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '25'
      )
      [05/2017] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '50'
      )
      [11/2017] =&gt; Array (
          [city] =&gt; 'ABC'
          [members] =&gt; '65'
      )
  )
  </code></pre>
  
  <p>I'm using <code>uksort</code> to sort it, but I guess <code>uksort</code> does not work with multidimensional array:</p>
  
  <pre><code>uksort($data, function($a1, $a2) {
      $time1 = strtotime($a1);
      $time2 = strtotime($a2);
  
      return $time1 - $time2;
  });
  </code></pre>
  
  <p>Please suggest how will it work with <code>uksort</code> or any other possibility?</p>