
September 30th, 2007, 02:53 AM
|
|
Developer Shed
|
|
Join Date: Jun 2007
Posts: 13,272
Time spent in forums: < 1 sec
Reputation Power: 15
|
|
|
Traverse Directories the Easy Way with Glob() !
There is a powerful yet somewhat unheard of function in PHP titled glob(). Many beginners and intermediates alike struggle with the traversing of directories. Acquiring the directories contents and returning them in a readable format. If only they know how so very easy this task was!
Glob was introduced into the PHP function lineup around the time PHP version 4 was released. It's not a new function in the slightest, but like checkdnsrr() it is a fairly undiscovered function for many.
The catchy misnomer that has long been used as a Unix library function, has a similar syntax reminiscent to regular expressions without the expressive power. It allows you to bring back filenames, and also directories, using a straightforward notation.
Read the full article here: Traverse Directories the Easy Way with Glob() !
|