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

求数组重组代码
我现在有一个数组如下:
[0] => Array
    (
        [size] => 123
        [path] => Array
            (
                [0] => a
                [1] => b
                [2] => c
                [3] => abc
            )

    )

[1] => Array
    (
        [size] => 456
        [path] => Array
            (
                [0] => d
                [1] => e
                [2] => f
                [3] => def
            )
    )
    
想重组成如下数组样式,请问怎么写代码啊?

[0] => Array
    (
        [a] => Array(
            [b] => Array(
                [c] => Array(
                    [size] => '123',
                    [name] => 'abc'
                )
            )
        )
    )

[1] => Array
    (
        [d] => Array(