In windows when we see detail view of folder and order by name i want exactly that sequence
in windows i get LEU2G0014L1A01.pdf as first in order but by my code i get LEU2G001041B01.pdf first in array any solution.?
<?php
$dir = "A/";
$result = find_all_files($dir);
sort($result);
print_r($result);
function find_all_files($dir)
{
$root = scandir($dir);
foreach($root as $value)
{
if($value === '.' || $value === '..') {continue;}
if(is_file("$dir/$value")) {$result[]="$value";continue;}
foreach(find_all_files("$dir/$value") as $value)
{
$result[]=$value;
}
}
return $result;
}
?>