Home >Backend Development >PHP Tutorial >如何生成个类似TREE结构的数组?

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

WBOY
WBOYOriginal
2016-06-23 14:03:291047browse



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

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页面))))


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


回复讨论(解决方案)

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

Statement:
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