这样的数组如何让它树状显示呢

WBOY
Release: 2016-06-13 12:38:26
Original
845 people have browsed it

这样的数组怎么让它树状显示呢?

Array<br>
(<br>
    [1] => Array<br>
        (<br>
            [id] => 1<br>
            [name] => 世界<br>
            [pid] => 0<br>
            [2] => Array<br>
                (<br>
                    [id] => 2<br>
                    [name] => 中国<br>
                    [pid] => 1<br>
                    [4] => Array<br>
                        (<br>
                            [id] => 4<br>
                            [name] => 湖南<br>
                            [pid] => 2<br>
                        )<br>
<br>
                )<br>
<br>
            [3] => Array<br>
                (<br>
                    [id] => 3<br>
                    [name] => 美国<br>
                    [pid] => 1<br>
                )<br>
 <div class="clear">
                 
              
              
        
            </div>
Copy after login
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