553 / 5.000 Resultados de tradução Resultado da tradução I have a folder that basically contains other folders like 'NAME - H:I - D/M/Y' and 'NAME - PHONE - H:I - D-M-Y'. When I use PHP's scandir(), it sorts alphabetically, which is how folders naturally look on my server, but I'd like to somehow sort that scandir by date, then time, then names alphabetically. enter image description heremente.
I tried using date comparison and inserting it into another array (simply which one is older first), then the same with the time, but then everything went wrong.
I know that using the sort() function, I can arrange the dates and times for Y-m-d H:i:s using explode(), but because I have a name and phone, I couldn't.
I looked through the documentation, but nothing that seemed particularly helpful in this case https://www.php.net/manual/en_US/array.sorting.php.