Re: Opendir listing

From: Date: Thu, 20 Feb 2003 21:02:38 +0000
Subject: Re: Opendir listing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136415@lists.php.net to get a copy of this message
on 2/20/03 3:34 PM, MIKE YRABEDRA at php@323ent.com wrote: > 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); > } > ?> Nevermind, got it. -- 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 <{{{>< --

« previous php.general (#136415) next »