$path = "./";
$narray=array();
$dir_handle = @opendir($path) or die("Unable to open $path");
$i=0;
while($file = readdir($dir_handle))
{
if(is_dir($file))
{
continue;
}
else if($file != '.' && $file != '..' && $file != 'index.php')
{
//echo "$file
";
$narray[$i]=$file;
$i++;
}
}
sort($narray);
for($i=0; $i'.$narray[$i].'';
}
//closing the directory
closedir($dir_handle);
?>