Date: 07/31/02
- Next message: mp: "[PHP] Creating Image..."
- Previous message: Dan Vande More: "FW: [PHP] Disabling Browser "BACK" button"
- Next in thread: Jason Wong: "Re: [PHP] dir to array?"
- Reply: Jason Wong: "Re: [PHP] dir to array?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Not sure why this isn't working, any help is appreciated. I am trying to
read the files in a directory and place them into an array. Here is the
code:
/* Function to create array of directory contents */
function dCNTS($files) {
$dir = opendir("/path/to/directory/");
while($imgs = readdir($dir)) {
if (($imgs != ".") && ($imgs != "..")) {
$cnt[count($imgs)] = $cnt;
} else {
print "Cannot create array of files in directory!"; }
}
closedir($dir);
}
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: mp: "[PHP] Creating Image..."
- Previous message: Dan Vande More: "FW: [PHP] Disabling Browser "BACK" button"
- Next in thread: Jason Wong: "Re: [PHP] dir to array?"
- Reply: Jason Wong: "Re: [PHP] dir to array?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

