I have 2 arrays(which could be more too) and they might have scattering data.
Date | Apple Date | Banana
----------------- -------------------
1 | 5 1 | 3
4 | 5 3 | 1
5 | 5 7 | 2
The array structure would be like as below.
array
(
[0] => array
(
[date] => 4
[apple] => 5
)
[1] => array
(
[date] => 5
[apple] => 5
)
)
What I need is to have a consolidated array having both the details. Example shown below.
Date Apple Banana
-------------------------------
1 5 3
3 0 1
4 5 0
5 5 0
7 0 2
How best we can do this considering the fact that array can hold multiple values? Any hint will help me to solve this. Or please point me to correct link if its already discussed. I could not find anything during search.
Thanks in advance.