Array slice doesn't seems to work
I'm trying to have the first file in a directory ordered by name asc. Here
is the code I use (php):
$dir = "fichiers/123/files_backup";
$premfic = array_slice(array_filter(scandir($dir), 'is_file'), 0, 5);
print_r($premfic);
But the array is empty... The directory contains 18 files and scandir
alone sees them. Any idea? Thanks
No comments:
Post a Comment