Page 1 of 1

Load Filenames into an Array

Posted: Wed Jul 13, 2005 4:39 pm
by is_blank
I'm sure this is something that comes up again and again...the examples at php.net are confusing me, though, so I'm hoping for a little simplification -- they seemed to be a bit of overkill for what I need. I'm trying to find every .html file in a folder and related subfolders, and file the names in an array so I can open each of them later and modify them. Could someone help me with a function, or point me to a decent (simple) example?

Thanks!
Jeff.

Posted: Wed Jul 13, 2005 4:56 pm
by Burrito
look at glob() you should.

Posted: Wed Jul 13, 2005 8:11 pm
by is_blank
Got it, thanks! (I had looked at glob() earlier, but couldn't get it working...thought maybe I was headed in the wrong direction. But I kicked it a little, and it's working now. Thanks for the confirmation.)

(...Why do I always catch you on Wednesdays? ;))

Posted: Wed Jul 13, 2005 11:57 pm
by John Cartwright
coincidence it is..
wednesday it is not
yoda talk no more i must