I have populated an array first column with filenames and second column with folder and filenames. I want to sort the array with respect to filename i.e. first column. I tried different array sorting functions but none gave me correct results.
Here's my code.
Thanks.Code:while (($file = readdir($dh)) != false) { // print "filename: $file : filetype: " . filetype($dir . $file) . "\n"; if(filetype($dir . $file)!='dir' and !in_array($file,$att)) { $filearray[$i][0] = $file; $filearray[$i][1] = $dir.$file; $i++; } }


Reply With Quote