我在 PHP 中有一个具有这种结构的数组:
Array
(
[7] => Array
(
[6] => Array
(
[200000000] => Array
(
[201000001] => Array
(
[201000002] => Entry
[201000003] => History
[201000004] => Statistic
[201000005] => Edit
)
)
)
[7] => Array
(
[200000000] => Array
(
[201000001] => Array
(
[201000002] => Entry
[201000005] => Edit
)
[201000006] => Request
[201000007] => Array
(
[201000008] => Array
(
[201000009] => Inbox
[201000010] => Cancellation
)
)
)
)
)
)
我怎样才能把这个数组变成这样的东西:
Array
(
[7] => Array
(
[6] => Array
(
[200000000] => Array
(
[201000001] => Array
(
[201000002] => Entry
[201000003] => History
[201000004] => Statistic
[201000005] => Edit
)
[201000006] => Request
[201000007] => Array
(
[201000008] => Array
(
[201000009] => Inbox
[201000010] => Cancellation
)
)
)
)
)
)
如果有 PHP 内置函数可以做到这一点,那更好?或者也许是一个没有太多循环的函数?
之前谢谢...