get latest data in folder php code example
Example: php get latest file in directory
$files = scandir('data', SCANDIR_SORT_DESCENDING);
$newest_file = $files[0];
$files = scandir('data', SCANDIR_SORT_DESCENDING);
$newest_file = $files[0];