How can I make my code only display links to the folders and not the files in the directory?
$d = dir(".");
echo "<ul>";
while(false !== ($entry = $d->read())) {
echo "<li><a href='{$entry}'>{$entry}</a></li>";
}
echo "</ul>";
$d->close();
$d = dir(".");
echo "<ul>";
while (false !== ($entry = $d->read()))
{
if (is_dir($entry) && ($entry != '.') && ($entry != '..'))
echo "<li><a href='{$entry}'>{$entry}</a></li>";
}
echo "</ul>";
$d->close();