How do I remove the '.' and '..' from displaying with the following script? I want just the files, not the dots.
<?php if ($handle = opendir('graphics/')) { echo "Files:<br>\n"; /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { echo "<a href=\"$file\">$file</a><br>\n"; } closedir($handle); } ?> -- Mike Yrabedra President 323, Inc. Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock _______________________________________________________________________ "Whatever you do, work at it with all your heart, as working for the Lord, not for men." ~Colossians 3:23 <{{{>< -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php