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 h
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 "."
> 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 a
3 matches
Mail list logo