我有 2 组二维数组,我想合并到 1 个二维数组中。但是每个数组中的元素数量不同,前两个元素相同,我不想复制它。在这里。
第一个二维数组:
Array(
[0] => Array
(
[0] => 25/2/2013
[1] => 8.45 a.m
[2] => 9.98
)
[1] => Array
(
[0] => 25/2/2013
[1] => 8.46 a.m
[2] => 9.02
)
)
第二个二维数组:
Array(
[0] => Array
(
[0] => 25/2/2013
[1] => 8.45 a.m
[2] => 1.23
[3] => 6.1
)
[1] => Array
(
[0] => 25/2/2013
[1] => 8.46 a.m
[2] => 1.75
[3] => 1.75
)
)
我如何得到这样的结果:
Array(
[0] => Array
(
[0] => 25/2/2013
[1] => 8.45 a.m
[2] => 9.98
[3] => 1.23
[4] => 6.1
)
[1] => Array
(
[0] => 25/2/2013
[1] => 8.46 a.m
[2] => 9.02
[3] => 1.75
[4] => 1.75
)
)
这是第一个数组的 var 导出:
( 0 => array ( 0 => '5/2/2013', 1 => '9:31:00 AM', 2 => '0.395', 3 => '0.395', 4 => '302.855', 5 => '0.563', ), 1 => array ( 0 => '5/2/2013', 1 => '9:33:00 AM', 2 => '0.383', 3 => '0.383', 4 => '303.431', 5 => '0.563', )
对于第二个数组:
( 0 => array ( 0 => '5/2/2013', 1 => '9:31:00 AM', 2 => '-1.000', 3 => '-1.000', 4 => '-1.000', 5 => '-1.670', 6 => '-1.000', 7 => '-11.000', ), 1 => array ( 0 => '5/2/2013', 1 => '9:33:00 AM', 2 => '-1.000', 3 => '-1.000', 4 => '-1.000', 5 => '-1.670', 6 => '-1.000', 7 => '-11.000', )