我有像这样的json回复
Array
(
[0] => Array
(
[id] => 65070
[date] => 2015-06-05
[hour] => 0
[total] => 18
)
[1] => Array
(
[id] => 65070
[date] => 2015-06-05
[hour] => 2
[total] => 32
)
[2] => Array
(
[id] => 65070
[date] => 2015-06-07
[hour] => 0
[total] => 27
)
[3] => Array
(
[id] => 65070
[date] => 2015-06-07
[hour] => 2
[total] => 35
)
[4] => Array
(
[id] => 1838680
[date] => 2015-06-05
[hour] => 0
[total] => 957
)
[5] => Array
(
[id] => 1838680
[date] => 2015-06-05
[hour] => 2
[total] => 1266
)
[6] => Array
(
[id] => 1838680
[date] => 2015-06-07
[hour] => 0
[total] => 409
)
[7] => Array
(
[id] => 1838680
[date] => 2015-06-07
[hour] => 2
[total] => 1528
)
)
我想要这样的输出
id Hour 2015-06-05 2015-06-07 Difference
65070 0 18 27 9
65070 2 32 35 3
1838680 0 957 409 -548
1838680 2 1266
小时不固定为0或2.也可以超过2或1