title: Sort Date array from txt file
body: <p>I have a <code>.txt</code> file that store all the information from my form. And I want to have 1 php that display status from the oldest date to today's date.</p>
  
  <p>This is some example of my txt format:</p>
  
  <blockquote>
    <p>ID4494 (tab("\t")) 12/02/2008 (tab("\t")) ANJAY</p>
    
    <p>ID4496 (tab("\t")) 14/04/2009 (tab("\t")) SONJA</p>
    
    <p>ID4499 (tab("\t")) 19/03/2014 (tab("\t")) BRIAN</p>
  </blockquote>
  
  <p>and this is my php file</p>
  
  <blockquote>
    <p>$myfilename = "../idfile/digid.txt";</p>
    
    <p>if( file_exists($myfilename) &amp;&amp; filesize($myfilename) > 0 ) {</p>
  
  <pre><code>  $digArray = file($myfilename, FILE_IGNORE_NEW_LINES);
  
    sort($digArray);
  
    foreach($digArray as $dig) {
  
    $oneDigArray = explode("\t", $dig);
  
    echo "&lt;p&gt;$oneDigArray[0] - $oneDigArray[1] - $oneDigArray[2]&lt;/p&gt;";
  
    }
  </code></pre>
    
    <p>} else {
        echo "<p>There is no Digital ID.</p>";
       }</p>
  </blockquote>
  
  <p>I tried to use sort <code>($digArray[1]);</code> since the date is array no. 1. But it wont work.</p>
  
  <p>Any suggestion?</p>
  
  <p>Thank you.</p>