c - 怎么递归渲染树(分类)?
黄舟
黄舟 2017-04-24 09:12:01
0
0
544

Hello.圣诞快乐!

我有个数据结构如下:

0 => array (size=13) 'id' => string '46' (length=2) 'name' => string 'Test' (length=9) 'parent_id' => string '1' (length=1) 'son' => array (size=2) 0 => array (size=13) ... 1 => array (size=12) ... 1 => array (size=13) 'id' => string '914' (length=3) 'name' => string '测试2' (length=9) 'parent_id' => string '0' (length=1) 'son' => array (size=3) 0 => array (size=12) ... 1 => array (size=12) ... 2 => array (size=12) ...

我怎么绘制一棵树呢?

    • 二级

  • 想了好久没想出来,其中array的son代表它的子节点。。。

    黄舟
    黄舟

    人生最曼妙的风景,竟是内心的淡定与从容!

    reply all (0)
    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!