Page 1 of 1

Listing the contents of a directory into an array

Posted: Fri Jan 03, 2003 7:51 am
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

Posted: Fri Jan 03, 2003 7:58 am
by kcomer
using opendir and readdir in combination will do the trick. Check the php manula for some good examples.

Posted: Fri Jan 03, 2003 8:08 am
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