"; $nosmall=""; $dir="Photos/"; include('./head.inc'); if ($handle = opendir($dir)) { $filearray = array(); for($i=0;false != ($file = readdir($handle));$i++) { if ($file != "." && $file != ".." && strstr(strtolower($file),"_thumb")) { $filearray[$i] = $file; } } echo "\n"; sort($filearray); $array_lowercase = array_map('strtolower', $filearray); array_multisort($array_lowercase, SORT_ASC, SORT_STRING, $filearray); //print_r($filearray); while ($file=current($filearray)) { if($count < 3) { $new_file = str_replace("_thumb","",$file); echo "\n"; } else { $new_file = str_replace("_thumb","",$file); echo "\n"; $count=0; } $count++; next($filearray); } echo "
"; echo "
\n"; echo "
"; echo "
\n"; echo "
\n"; closedir($handle); } include('./foot.inc'); ?>