Array(
[0] => Array
(
[created_at] => 2016-08
[a] => 31900.00
)
[1] => Array
(
[created_at] => 2016-09
[a] => 45400.00
)
[2] => Array
(
[created_at] => 2016-10
[a] => 69489.00
)
)
Array
(
[0] => Array
(
[created_at] => 2016-08
[b] => 21900.00
)
[1] => Array
(
[created_at] => 2016-09
[b] => 25400.00
)
)
怎么合并成下面数组啊
Array
(
[0] => Array
(
[created_at] => 2016-08
[a] => 31900.00
[b] => 21900.00
)
[1] => Array
(
[created_at] => 2016-09
[a] => 45400.00
[b] => 25400.00
)
[2] => Array
(
[created_at] => 2016-10
[a] => 69489.00
[b] =>
)
)
结果 :
以下代码可以满足你的要求,尽管这个要求有点奇怪
从常规索引数组到关联数组,没有想到好办法,只能循环了。
很难判断算法在大数据量时的优缺点