if ($handle = opendir('./images')) //change to point to your directory { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file"; //change to match your path } } } ?>