How to generate an array similar to a TREE structure? The data is shown above. The format of the array to be grown is as follows: array (0 & gt; array (url & gt;. php, name & gt; A page, zijiedian & gt; array (0 & gt; array (url & gt; c. php, name & gt; C page), 1 & gt; array (url & gt; e. how does php generate an array similar to a TREE structure?
The data is shown above.
The format of the array to be grown is as follows:
Array (
0 => array ('URL' =>. php, 'name' => A page, 'zijiedian '=> array (0 => array ('URL' => c. php, 'name' => C page), 1 => array ('URL' => e. php, 'name' => E page )))
1 => array ('URL' => B. php, 'name' => B Page, 'zijiedian '=> array (0 => array ('URL' => d. php, 'name' => D page )))
)
Find out how to generate such an array as quickly as possible... Arrays are two-dimensional.
------ Solution --------------------
Http://bbs.csdn.net/topics/390364669