这似乎很容易,但无法弄清楚如何做到这一点。当前数组数据按日期列出,按日期数量列出,所以我需要将所有日期组合起来:日、月、6 个月、1 年。我需要安排数组数据看起来像下面的第二个数组。
array
0 => enter code here
array
'1_day' => int 37
1 =>
array
'30_day' => int 3275
2 =>
array
'180_day' => int 3908
3 =>
array
'1_year' => int 6933
4 =>
array
'date' => string '2013-02-13' (length=10)
5 =>
array
'1_day' => int 46
6 =>
array
'30_day' => int 3134
7 =>
array
'180_day' => int 3764
8 =>
array
'1_year' => int 6820
9 =>
array
'date' => string '2013-02-12' (length=10)
10 =>
array
'1_day' => int 61
11 =>
array
'30_day' => int 3127
12 =>
array
'180_day' => int 3750
13 =>
array
'1_year' => int 6807
14 =>
array
'date' => string '2013-02-11' (length=10)
array
0 =>
'1_day' => int 37
'30_day' => int 3275
'180_day' => int 3908
'1_year' => int 6933
'date' => string '2013-02-13' (length=10)
1 =>
'1_day' => int 46
'30_day' => int 3134
'180_day' => int 3764
'1_year' => int 6820
'date' => string '2013-02-12' (length=10)
2 =>
'1_day' => int 61
'30_day' => int 3127
'180_day' => int 3750
'1_year' => int 6807
'date' => string '2013-02-11' (length=10)