Code: Select all
function test($parentID, $table_index='')
{
$child_arr = $this->query_database('', '', 'SELECT * FROM page WHERE parentID ='.$parentID);
$count_children = count($child_arr);
for($c=0; $c<$count_children; $c++)
{
$table_index .= '['.$c.']';
$this->page_list+$table_index = $child_arr[$c]['title'];
$this->test($child_arr[$c]['ID'], $c);
}
print_r($this->page_list);
//return $this->page_list;
}
Just how do i construct and pass along my new location in the multidimensional array and pass this to the next iteration of the function so that the script knows where to insert the data?