Load Filenames 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
is_blank
Forum Commoner
Posts: 36
Joined: Sat Jun 25, 2005 6:05 pm
Location: Tennessee, USA

Load Filenames into an Array

Post 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.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

look at glob() you should.
User avatar
is_blank
Forum Commoner
Posts: 36
Joined: Sat Jun 25, 2005 6:05 pm
Location: Tennessee, USA

Post 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? ;))
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

coincidence it is..
wednesday it is not
yoda talk no more i must
Post Reply