title: PHP Array sort by string date
body: <p>I have an array that looks like this</p>
  
  <pre><code>array(24) { ["#HiddenId"]=&gt; string(24) "2013-11-08T11:59:54.378Z"] }
  </code></pre>
  
  <p>It has multiple ids/dates but I want to sort it by date (most recent)</p>
  
  <p>I know how to do this for this format, "01/01/2014" however I Believe it is easier to work with this format, but I'm unsure of how to implement.</p>
  
  <p>This is the code I have for format "01/01/2014"</p>
  
  <pre><code>uasort($fileList, "my_sort");
  
  function my_sort($a,$b)
  {
      $date1 = DateTime::createFromFormat('d/m/Y', $a);
      $date2 = DateTime::createFromFormat('d/m/Y', $b);
      return $date1 &lt; $date2;
  }
  </code></pre>
  
  <p>I need to do this function similar but for the other format shown above.</p>
  
  <p>Any help is appreciated </p>