title: How to sort array based on date in descending order
body: <p>I need to sort array object based on date in descending order using php. I tried following code, but it didn't get expected result. Can you suggest be to do this task. Thanks in advance.</p>
  
  <pre><code>$document_list = array( '01-14-2013', '01-12-2013', '04-05-2016' );
  usort($document_list, array($this, "sortByDate"));
  
  function sortByDate($a, $b) {
      return  strcmp($b['createdDate'], $a['createdDate']);
  }
  </code></pre>
  
  <p>When i tried this code, it get wrong output.</p>