Hi, I'm new here..
Please help me, I'm still new with php and I want to sort my files from dir to show the latest uploaded first..
Please fix this code
PHP Code: 
$dir "video/new";
if(!(
$dp opendir("$dir"))) die ("Cannot open ./"); 
$file_array = array(); 
while (
$file readdir ($dp)) 

if(
substr($file,0,1) != '.' and $file != "index.php" and $file != "thumbs"

$file_array[] = $file


$file_count count ($file_array); 
sort ($file_array); 
Thanks in advance
Jgutz Reviewed by Jgutz on . Help sorting files from directory by latest uploaded Hi, I'm new here.. Please help me, I'm still new with php and I want to sort my files from dir to show the latest uploaded first.. Please fix this code $dir = "video/new"; if(!($dp = opendir("$dir"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php" and $file != "thumbs") { Rating: 5