I have this part of script that echos the folders in "albums" folder and arrange them by the alphabet, but for some reason it also includes an empty folder.
$directory = opendir("albums/");
$items = array();
while($items[] = readdir($directory))
sort($items);
closedir($directory);
foreach ($items as $item)
{
if(($item != ".") && ($item != "..")){
$files[] = $item;
}
}
What should I do? I think the if(($item != ".") && ($item != ".."))
is part of my problem but I can't figure how to handle it.