i'm using this code to read and save all sub-directories of one directory into array, the subdirectories are named with the number from 1 to 40
if ( $dh = @opendir($path) )
{
while ( false !== ( $file = readdir($dh) ) )
{
if ( $file != '.' && $file != '..' && $file != 'index.htm' && $file!='dont' )
{
$catch[] = $file;
}
}
}
after that with "for" i'm echoing them all, but the problem is that it sorts them alphabetical, 10,11,12......19,2,20 and so on
i need they be shown in numeric order, 1,2,3....19,20,21....