Re: List Files in Directory to Array
| From: | Bix | Date: | Sun, 15 Jun 2003 23:50:05 +0000 |
| Subject: | Re: List Files in Directory to Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151610@lists.php.net to get a copy of this message | ||
I have found ftp_nlist()
Should suit me perfectly, sorry to trouble!
Bix. ;o)
"Bix" <php@bix.cc> wrote in message
news:20030615234625.72351.qmail@pb1.pair.com...
> Hi all...
>
> Is there any way of reading the contents of a directory into an array so I
> can generate a listing from it?
>
> I can't see a filesystem function for this, how about with ftp functions?
Am
> looking around at the moment but would appreciate some help.
>
> I am looking to read each file in the directory into an array ie:
>
> $array_files[1] = "foo.jpg"
> $array_files[2] = "bar.jpg"
> etc...
>
> So I can then do a foreach and put them all in a drop down box to choose
the
> image.
>
> Thanks in advance ;o)
>
> Bix
>
>