日期:2014-05-17  浏览次数:20500 次

这样的数组怎么让它树状显示呢?
Array
(
    [1] => Array
        (
            [id] => 1
            [name] => 世界
            [pid] => 0
            [2] => Array
                (
                    [id] => 2
                    [name] => 中国
                    [pid] => 1
                    [4] => Array
                        (
                            [id] => 4
                            [name] => 湖南
                            [pid] => 2
                        )

                )

            [3] => Array
                (
                    [id] => 3
                    [name] => 美国
                    [pid] => 1
                )