This question already has an answer here:
I have 3 set of 2d array that have different element number?One is the array that need to be as key(date and time) to compare with other two array.The other two array must in sequence.For row that empty, i want set as -9999.
First array :
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
)
)
For second array:
Array(
[0] => Array
(
[0] => 01/7/2013
[1] => 12.01 a.m
[2] => 9.02
)
)
For Third array:
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
)
)
and i need the output as:
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
)
)
</div>