View Single Post
Old 04-09-2009, 11:33 AM   #11 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

we can condense it further with the SPL DirectoryIterator:
PHP Code:
$directory './';
$pDir = new DirectoryIterator($directory);
foreach(
$pDir as $fInf)
{
    if(
$fInf->isDot()) { continue; }
    if(
$fInf->isDir()) 
    { 
        echo 
'<strong>'$fInf->getFilename() , '</strong><br />'
    }
    else
    {
        echo 
$fInf->getFilename() , '<br />';
    }

__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote