我有一个数组(wordpress),想要删除或添加一些部分。我不知道我的一些需求是否可行以及如何实现。
这些是我的需求:删除[LineRoot]但保留所有[line](只是移动到父级,以使所有[Line]与[LineRoot]处于同一级别)
Array
(
[0] => Array
(
[Order] => 679
[LivraisonPrenom] => Joe
[LineRoot] => Array
(
[Line] => Array
(
[0] => Array
(
[ll] => hh
[Id] => 20
[SKU] => A104
[Quantity] => 1
)
)
[Line] => Array
(
[0] => Array
(
[ll] => hh
[Id] => 22
[SKU] => A105
[Quantity] => 1
)
)
)
[Meta-LangueBL] =>
[CheckoutAddOns] => Array
(
[CheckoutAddOn] => Array
(
[0] => Array
(
[ID] => 2
[Name] => Livraison
[Cost] => -48.33
)
)
)
)
)
答案 0 :(得分:0)