Page 1 of 1

glob() - What exactly does it do?

Posted: Wed Oct 05, 2005 1:10 pm
by Luke
OK, I came accross this function on php.net, and it looks interesting, but I'm not sure exactly what it does/is used for. Can somebody explain it in n00b terms?

Posted: Wed Oct 05, 2005 1:12 pm
by feyd
glob() is used to search a location (directory) for files and directories contained within it. It allows the usage of patterns to filter the results, it can sort them, only return directories, etc..

Posted: Wed Oct 05, 2005 1:13 pm
by Luke
Wow... I've been looking for a way to do that for a long time. Nice!