I have the following code to list directories, excluding files:
$dir = "pictures";
$folder = scandir($dir, 0);
$files = array_reverse($folder);
for( $ctr = 0; $ctr < sizeof( $files ); $ctr++ ) {
if($files[$ctr] != "." && $files[$ctr] != "..")
print "$files[$ctr]<br>";
}
but it lists directories AND files.... I want to exclude the files.
How can I do that?
Many thanks,
R