我有 3 组具有不同元素编号的二维数组?一个是需要作为键(日期和时间)与其他两个数组进行比较的数组。另外两个数组必须按顺序排列。对于空的行,我想要设置为-9999。
第一个数组:
Array (
[0] => Array
(
[0] => 01/7/2013
[1] => 12.00 a.m
)
[1] => Array
(
[0] => 01/7/2013
[1] => 12.01 a.m
)
[2] => Array
(
[0] => 01/7/2013
[1] => 12.02 a.m
)
)
对于第二个数组:
Array(
[0] => Array
(
[0] => 01/7/2013
[1] => 12.01 a.m
[2] => 9.02
)
)
对于第三个数组:
Array(
[0] => Array
(
[0] => 01/7/2013
[1] => 12.00 a.m
[2] => 1.23
[3] => 6.1
)
[1] => Array
(
[0] => 01/7/2013
[1] => 12.02 a.m
[2] => 1.75
[3] => 1.75
)
)
我需要输出为:
Array(
[0] => Array
(
[0] => 01/7/2013
[1] => 12.00 a.m
[2] => -9999
[3] => 1.23
[4] => 6.1
)
[1] => Array
(
[0] => 01/7/2013
[1] => 12.01 a.m
[2] => 9.02
[3] => -9999
[4] => -9999
)
[2] => Array
(
[0] => 01/7/2013
[1] => 12.02 a.m
[2] => -9999
[3] => 1.75
[4] => 1.75
)
)