Listing the contents of a directory into an array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Listing the contents of a directory into an array

Post by Johnm »

Hi All,
Listing the contents of a directory into an array. Right now I am doing this with a shell script then reading in the file that the shell script creates, anyone know how to do this using php?


John M
kcomer
Forum Contributor
Posts: 108
Joined: Tue Aug 27, 2002 8:50 am

Post by kcomer »

using opendir and readdir in combination will do the trick. Check the php manula for some good examples.
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post by Johnm »

I totaly looked right past that section in the manual... I never even noticed it... I must be getting old.

Thanks.

John M
Post Reply