Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. while ($file = readdir($fp))
  2. {
  3. if ($file != "." && $file != "..")
  4. {
  5. $date=date('d-m-Y, H:i:s', filemtime($dir . "/" . $file)) . "<br/>";
  6. $dates[] = $date;
  7. }
  8. }
  9. rsort($dates);
  10. $arrlength = count($dates);
  11. for($x = 0; $x < $arrlength; $x++)
  12. {
  13. echo $dates[$x];
  14. echo "<br>";
  15. }```
  16.  
  17. 23-05-2019, 15:36:55
  18.  
  19. 23-05-2019, 15:35:35
  20.  
  21. 23-05-2019, 15:33:47
  22.  
  23. 23-05-2019, 15:29:30
  24.  
  25. 23-05-2019, 14:54:38
  26.  
  27. 23-05-2019, 14:53:52
  28.  
  29. sort it by descending order.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement