im having a weird problem this script is supposed to list files in a dir which in this case images i got t to display the images but i keep getting 2 blank images at the top its like its repeating can any one suggest what i have done wrong with this code?
$dir="wallpapers"; // Directory where files are stored
if ($dir_list = opendir($dir))
{
while(($filename = readdir($dir_list)) !== false)
{
echo "<image src=\"$dir/$filename\"height=\"50\" \"width=\"50\"\><a href=\"$dir/$filename\">[b]$filename[/b]</a>
";
}
closedir($dir_list);