树形数据模板上如何输出

浏览:143 发布日期:2019/04/15 分类:基础算法
这种树形数据如何在模板上循环输出树形表呢?
这种树形数据如何在模板上循环输出树形表呢?
array(2) {
[0] => array(13) {
["id"] => int(3)
["pid"] => int(0)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(6) "测试"
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
["children"] => array(4) {
[0] => array(12) {
["id"] => int(5)
["pid"] => int(3)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
[1] => array(13) {
["id"] => int(6)
["pid"] => int(3)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
["children"] => array(2) {
[0] => array(12) {
["id"] => int(9)
["pid"] => int(6)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
[1] => array(13) {
["id"] => int(10)
["pid"] => int(6)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
["children"] => array(1) {
[0] => array(12) {
["id"] => int(13)
["pid"] => int(10)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
}
}
}
}
[2] => array(13) {
["id"] => int(7)
["pid"] => int(3)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
["children"] => array(2) {
[0] => array(13) {
["id"] => int(11)
["pid"] => int(7)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
["children"] => array(1) {
[0] => array(12) {
["id"] => int(14)
["pid"] => int(11)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
}
}
[1] => array(13) {
["id"] => int(12)
["pid"] => int(7)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
["children"] => array(1) {
[0] => array(12) {
["id"] => int(15)
["pid"] => int(12)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
}
}
}
}
[3] => array(12) {
["id"] => int(8)
["pid"] => int(3)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(0) ""
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
}
}
[1] => array(12) {
["id"] => int(4)
["pid"] => int(0)
["type"] => int(0)
["name"] => string(0) ""
["title"] => string(6) "测试"
["condition"] => string(0) ""
["ismenu"] => int(0)
["sort"] => int(0)
["icon"] => string(0) ""
["remark"] => NULL
["status"] => int(0)
["delete_time"] => NULL
}
}
评论( 相关
后面还有条评论,点击查看>>