我有三个数组如下:
Array
(
[1000] => Item 0
[1001] => Item 1
[1002] => Item 2
)
Array
(
[1000] => £35.00
[1001] => £60.00
[1002] => £24.00
)
Array
(
[1000] => 1
[1001] => 2
[1002] => 3
)
我需要合并这三个保留键的数组,如下所示:
Array
(
[1000] => Array
(
[0] => Item 0
[1] => £35.00
[2] => 1
)
[1001] => Array
(
[0] => Item 1
[1] => £60.00
[2] => 2
)
[1002] => Array
(
[0] => Item 2
[1] => £24.00
[2] => 3
)
)
array_map(null, array1, array2, array3)
在一定程度上解决了它,但不保留密钥。怎么做到呢?