note 74996 added to function.glob
| From: | nataxia at gmail dot com | Date: | Mon, 07 May 2007 23:05:47 +0000 |
| Subject: | note 74996 added to function.glob | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126308@lists.php.net to get a copy of this message | ||
Something I used to sort dir & subdir into array (multidimensional) reflecting dir structure.
function getRecursiveFolderList($curDir,$currentA=false)
{
$dirs = glob($curDir . '/*', GLOB_ONLYDIR);
$cur = 0;
foreach($dirs as $dir)
{
$currentA[$cur]['path'] = $dir;
$currentA[$cur] = $this->getRecursiveFolderList($dir,$currentA[$cur]);
++$cur;
}
return $currentA;
}
----
Server IP: 69.39.81.135
Probable Submitter: 65.19.56.95
----
Manual Page -- http://www.php.net/manual/en/function.glob.php
Edit -- https://master.php.net/note/edit/74996
Del: integrated -- https://master.php.net/note/delete/74996/integrated
Del: useless -- https://master.php.net/note/delete/74996/useless
Del: bad code -- https://master.php.net/note/delete/74996/bad+code
Del: spam -- https://master.php.net/note/delete/74996/spam
Del: non-english -- https://master.php.net/note/delete/74996/non-english
Del: in docs -- https://master.php.net/note/delete/74996/in+docs
Del: other reasons-- https://master.php.net/note/delete/74996
Reject -- https://master.php.net/note/reject/74996
Search -- https://master.php.net/manage/user-notes.php