コードにこの配列があります
Array
(
[0] => Array
(
[0] => Roof setting
[1] => [2013-04-22,7]
)
[1] => Array
(
[0] => Garbage Collection
[1] => [2013-04-22,22]
)
[2] => Array
(
[0] => Sales Payout
[1] => [2013-04-22,10]
)
[3] => Array
(
[0] => Sales Payout
[1] => [2013-04-25,10]
)
[4] => Array
(
[0] => Sales Payout
[1] => [2013-04-25,10]
)
[5] => Array
(
[0] => Fix cable car2
[1] => [2013-04-24,77.79]
)
[6] => Array
(
[0] => Fix cable car2
[1] => [2013-04-25,77.79]
)
)
ここで、繰り返しラベルごとにラベルを 1 回だけ表示し、それらのラベルに沿って繰り返し日付を複数回表示する形式でこの配列を取得したいと考えています。結果は次のようになります。
Array
(
'label': => Roof setting
(
'data:' => [2013-04-22,7]
),
'label' => Garbage Collection
(
'data': => [2013-04-22,22]
)
'label' => Sales Payout
(
'data:' => [[2013-04-22,10],[2013-04-25,10],[2013-04-25,10]]
)
'label' =>Fix cable car2
(
'data' => [[2013-04-24,77.79[,2013-04-25,77.79]]
[1] => [2013-04-24,77.79[
)
)