title: PHP order array by date?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2910611/php-sort-a-multidimensional-array-by-element-containing-date">PHP Sort a multidimensional array by element containing date</a>  </p>
  </blockquote>
  
  
  
  <p>I have some data from XML or JSON in a PHP array that looks like this:</p>
  
  <pre><code>[0]= array(2) {
      ["title"]= string(38) "Another title"
      ["date"]= string(31) "Fri, 17 Jun 2011 08:55:57 +0200"
  }
  [1]= array(2) {
      ["title"]= string(38) "My title"
      ["date"]= string(31) "Mon, 16 Jun 2010 06:55:57 +0200"
  }
  </code></pre>
  
  <p><strong>What I want to do is order the two items by date.</strong></p>
  
  <ol>
  <li>Is it possible to sort by date, when the sort value is inside every item?</li>
  <li>Do I need to convert the date format to timestamp?</li>
  </ol>
  
  <p><strong>What I don't want to do</strong></p>
  
  <p>I could use date and set it as the ID but that don't feel right, because two items can have the same date and then it would not be unique.</p>