01-31-2010, 04:19 AM
|
#3 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
OK, here's a sweet little function I made that does exactly what you need:
PHP Code:
function glob_recursive($dir) { static $g = array(); foreach(glob($dir,GLOB_ONLYDIR) as $i=>$k) { $g[] = $k; glob_recursive($k.'/*'); } return $g; }
And use like so:
PHP Code:
print_r(glob_recursive('dingo/*'));
The only problem is, you can't use it twice. I'll let you figure out how to fix that though. 
|
|
|
|