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

WBOY
Release: 2016-06-23 14:03:29
Original
1001 people have browsed it



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

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


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


回复讨论(解决方案)

http://bbs.csdn.net/topics/390364669

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!