I have a php file that creates an array of everything in my user directory, then the array is sent back to the iPhone.
The array created by my php arranges them in alphabetical order, I want it to be sorted by file creation date.
This is what my php file looks like
<?php
$username = $_GET['username'];
$path = "$username/default/";
$files = glob("{$path}/{*.jpg,*.jpeg,*.png}", GLOB_BRACE);
echo json_encode($files);
?>
How should I do it?
Thank:)
Jacob source
share