我有一个 PHP 数组,我试图将其分成 2 个不同的数组到该特定数组中。我试图提取每个“目的地”和“平衡”的任何值。
这是我得到的数组,
Array
(
[destination_1] => 1
[balance_1] => 1
[destination_2] => 2
[balance_2] => 2
[destination_3] => 3
[balance_3] => 3
)
我需要像这样的输出,
Array (
[0] => Array (
[destination_1] => 1
[balance_1] => 1
)
[1] => Array (
[destination_2] => 2
[balance_1] => 2
)
[2] => Array (
[destination_3] => 3
[balance_3] => 3
)
)
慕仙森