怎么生成个类似TREE结构的数组

WBOY
Release: 2016-06-13 12:50:38
Original
1135 people have browsed it

如何生成个类似TREE结构的数组?


数据是上面那样子。
想成长的数组格式如下

<br />
array(<br />
0=>array('url'=>a.php,'name'=>A页面,'zijiedian'=>array(0=>array('url'=>c.php,'name'=>C页面),1=>array('url'=>e.php,'name'=>E页面)))<br />
1=>array('url'=>b.php,'name'=>B页面,'zijiedian'=>array(0=>array('url'=>d.php,'name'=>D页面)))<br />
)<br />
Copy after login


求如何以最快的速度生成这样的数组。。。数组就是二维的。


------解决方案--------------------
http://bbs.csdn.net/topics/390364669
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!