I have a basic directory listing script, what Id like to do though is display the filenames in the directory without showing the extension of each file. Does anyone know how this might be done?
This is the script Im using:
<?php
$default_dir = "./images";
if(!($dp = opendir($default_dir))) die("Cannot open $default_dir.");
while($file = readdir($dp))
if($file != '.' && $file != '..') echo "$file<br>";
closedir($dp);
?>