我有多维数组。它可以扩展到N级。我只想收集名字。从孩子到父母的名字。例如我需要这样的输出
名称 => “Sport/Algemeen/techn.sp.ondgd/ondergoed dames/Sport bh”
. 级别最多可以创建 N 个数字。
[categories] => Array
(
[0] => Array
(
[@id] => 1
[name] => 78057 | Sport bh
[parent] => Array
(
[@id] => 2
[name] => 7805 | ondergoed dames
[parent] => Array
(
[@id] => 3
[name] => 780 | techn.sp.ondgd
[parent] => Array
(
[@id] => 4
[name] => Algemeen
[parent] => Array
(
[@id] => 5
[name] => Sport
)
)
)
)
)
)