Re: Re: Is there something like findfirst/findnext

From: Date: Wed, 12 Feb 2003 16:24:40 +0000
Subject: Re: Re: Is there something like findfirst/findnext
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-18488@lists.php.net to get a copy of this message
Just what I need!!! Thanks Ignatius Reilly wrote:
You could have read even better: <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) {
       if ($file != "." && $file != "..") {
           echo "$file\n";
       }
} closedir($handle); } ?> This will avoid the "." and ".." elements in the directory, that one usually does not need. HTH INAS, from Brussels (Ignatius is Not Ander Svensson) ____________________________________________ ----- Original Message ----- From: "J.Veenhuijsen" <info@solid-digital.nl> To: <php-windows@lists.php.net> Sent: Wednesday, February 12, 2003 4:55 PM Subject: [PHP-WIN] Re: Is there something like findfirst/findnext
I should have read the manual better. <?php if ($dir = @opendir("/tmp")) { while (($file = readdir($dir)) !== false) {
    echo "$file\n";
} closedir($dir); } ?> J.Veenhuijsen wrote:
I need to retrieve a list of files (jpg) in a directory. Is there a function like findfirst(*.jpg) like there is in Delphi? Thanks in advance ? Jochem
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.windows (#18488) next »