This code will display all of the files within a specified directory with a filetype restriction. ".substr($file, 0, -4).""; } } // close directory closedir($handle); } ?>