0
I have a php code, which I use to make files available to clients, but I need it to sort the file name from the largest to the smallest, for example, I have the files:
2019 Arquivo 1
2018 Arquivo 2
2017 Arquivo 3
I need them to take this ordination.
<?php
foreach (glob("*.pdf") as $arquivo) {
echo "<a href='$arquivo'>$arquivo</a><br>" ;
}
?>
How did you try to order it? What was the result obtained?
– Woss
I was trying to use (command filemtime()), but I couldn’t get any results.
– Victor Maziero
Victor, then this solution is useful? How to check which latest file in a Python folder?
– Woss