Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while ($file = readdir($fp))
- {
- if ($file != "." && $file != "..")
- {
- $date=date('d-m-Y, H:i:s', filemtime($dir . "/" . $file)) . "<br/>";
- $dates[] = $date;
- }
- }
- rsort($dates);
- $arrlength = count($dates);
- for($x = 0; $x < $arrlength; $x++)
- {
- echo $dates[$x];
- echo "<br>";
- }```
- 23-05-2019, 15:36:55
- 23-05-2019, 15:35:35
- 23-05-2019, 15:33:47
- 23-05-2019, 15:29:30
- 23-05-2019, 14:54:38
- 23-05-2019, 14:53:52
- sort it by descending order.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement