Re: RE: Simple recursion function not working. Please help newbie
| From: | Marek Kilimajer | Date: | Tue, 29 Apr 2003 13:42:15 +0000 |
| Subject: | Re: RE: Simple recursion function not working. Please help newbie | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145648@lists.php.net to get a copy of this message | ||
This is not a good disign, how do you find out directory's subdirs and files? I would recomend you to change the structure to the following:
array (
array( 'ID' => dirs_id,
'name' => dirname/filename,
'subdirs_files' = array ( same structure as parent)),
.....
David Wilson wrote:
The structure of the subdirs array is ... The subdirs array is an [n][3] array. $subdirs[n][0] == ID $subdirs[n][1] == Parent Dir. ID $subdirs[n][2] == Filename/Directory Ex: subdirs[0][0] == 4 subdirs[0][1] == 0 subdirs[0][2] == Developer Dir ... -David -----Original Message----- From: Marek Kilimajer [mailto:kilimajer@webglobe.sk] Sent: Tuesday, April 29, 2003 9:24 AM To: David Wilson Cc: php-general@lists.php.net Subject: Re: Simple recursion function not working. Please help newbie So what is the structure of the array? Do you need a recursive function? David Wilson wrote:No. This function does not actually open any files. All it does it it receives an array of directories (which were from a database) and thenmakesHTML code to for a select box. -David