我有 2 个数组
$data1 = array(
['Ngay'=>'15-10-2013','esoluz'=>'5'],
['Ngay'=>'16-10-2013','esoluz'=>'3'],
['Ngay'=>'17-10-2013','esoluz'=>'7']
);
$data2 = array(
['Ngay'=>'15-10-2013','google'=>'10'],
['Ngay'=>'16-10-2013','google'=>'8']
);
我希望它变成:
$result = array(
['Ngay'=>'15-10-2013','esoluz'=>'5','google'=>'10'],
['Ngay'=>'16-10-2013','esoluz'=>'3','google'=>'8'],
['Ngay'=>'17-10-2013','esoluz'=>'7'],
)
因为我需要一个像 $result 这样的数组来对其进行 json_encode 来制作图表,但这让我感到困惑。所以,感谢任何有用的想法!