Date: 07/31/02
- Next message: Kevin Myrick: "[PHP] I need some help: PHP portal site/creating email accounts through form submission"
- Previous message: Jay Blanchard: "RE: [PHP] Printing a PHP Class"
- In reply to: Jason Wong: "Re: [PHP] dir to array?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I got it fixed, thanks again. Just in case anyone else needs help with this
type of item look at readdir() at http://www.php.net
Jas
"Jason Wong" <php-general <email protected>> wrote in message
news:200208010411.06801.php-general <email protected>
> On Thursday 01 August 2002 03:00, Jas wrote:
> > 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);
> > }
>
> HOW isn't it working?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> One person's error is another person's data.
> */
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Kevin Myrick: "[PHP] I need some help: PHP portal site/creating email accounts through form submission"
- Previous message: Jay Blanchard: "RE: [PHP] Printing a PHP Class"
- In reply to: Jason Wong: "Re: [PHP] dir to array?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

