[PHP] Listing the contents of a directory in an array

2002-05-17 Thread webmaster
I am a newbie so be kindI have looked into the manual about directory functions etc.I want to return all the files from a directory into a array. Could some one give me a few pointers or something? I keep getting confused but I have used google and the manual. I canfind functions but I

Re: [PHP] Listing the contents of a directory in an array

2002-05-17 Thread Lowell Allen
From: [EMAIL PROTECTED] I am a newbie so be kind I have looked into the manual about directory functions etc. I want to return all the files from a directory into a array. Could some one give me a few pointers or something? I keep getting confused but I have used google and the

RE: [PHP] Listing the contents of a directory in an array

2002-05-17 Thread Jared Boelens
I actaully had to do that yesterday, here is the code i used. $path = /foo/bar; $myArray = $array(); $dir = opendir($path); while($file = readdir($dir)) { // if(!ereg(^\., $file) { $myArray[count($myArray)] = $file; // } } closedir($dir); If you want to exclude the always present . and

Re: [PHP] Listing the contents of a directory in an array

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002 [EMAIL PROTECTED] wrote: I am a newbie so be kind I have looked into the manual about directory functions etc. I want to return all the files from a directory into a array. Could some one give me a few pointers or something? I keep getting confused but I have used