我有以下輸出,並需要獲得結果下面的組的結果按月和時間(PartStart)的日期是在陣列中,我怎麼能在PHP中做到這一點? 如果有人能幫助我,謝謝,我已經試過這樣做,但不是最終的結果,我需要我如何過濾陣列以獲得以下結果
Array
(
[0] => stdClass Object
(
[End] => September 30, 2013 21:00:00 +0000
[ResizeEnabled] =>
[RightClickEnabled] =>
[InnerHTML] => Prog 1 (PL2) - vitor.tavora - S38:51, 2 - LAI3.DEI (DS.01.09
)`enter code here`
[Width] => 50
[BarLength] => 120
[ContextMenu] =>
[PartStart] => September 30, 2013 18:00:00 +0000
[Text] => Prog 1 (PL2) - vitor.tavora - S38:51, 2 - LAI3.DEI (DS.01.09
)
[ToolTip] => Programação I (PL2)
Ano 1 - vitor.tavora - S38:51, 2 - LAI3.DEI (DS.01.09
) - 18:00 - 21:00
[Height] => 120
[Left] => 0
[BarColor] => Blue
[PartEnd] => September 30, 2013 21:00:00 +0000
[BackgroundColor] => #FFC37B
[Tag] =>
[DayIndex] => 0
[DeleteEnabled] =>
[MoveEnabled] =>
[Value] => 0
[ClickEnabled] =>
[Start] => September 30, 2013 18:00:00 +0000
[BarStart] => 0
[Box] => 1
[Top] => 401
)
[1] => stdClass Object
(
[End] => September 30, 2013 21:00:00 +0000
[ResizeEnabled] =>
[RightClickEnabled] =>
[InnerHTML] => Prog 1 (PL1) - sonia.luz - S38:51, 2 - LAI5.DEI (D.S.01.16
)
[Width] => 50
[BarLength] => 120
[ContextMenu] =>
[PartStart] => September 30, 2013 18:00:00 +0000
[Text] => Prog 1 (PL1) - sonia.luz - S38:51, 2 - LAI5.DEI (D.S.01.16
)
[ToolTip] => Programação I (PL1)
Ano 1 - sonia.luz - S38:51, 2 - LAI5.DEI (D.S.01.16
) - 18:00 - 21:00
[Height] => 120
[Left] => 50
[BarColor] => Blue
[PartEnd] => September 30, 2013 21:00:00 +0000
[BackgroundColor] => #FFC37B
[Tag] =>
[DayIndex] => 0
[DeleteEnabled] =>
[MoveEnabled] =>
[Value] => 0
[ClickEnabled] =>
[Start] => September 30, 2013 18:00:00 +0000
[BarStart] => 0
[Box] => 1
[Top] => 401
)
[2] => stdClass Object
(
[End] => October 1, 2013 20:00:00 +0000
[ResizeEnabled] =>
[RightClickEnabled] =>
[InnerHTML] => TComp (TP) - rvasco - S38:51, 2 - A.S2.03
[Width] => 100
[BarLength] => 80
[ContextMenu] =>
[PartStart] => October 1, 2013 18:00:00 +0000
[Text] => TComp (TP) - rvasco - S38:51, 2 - A.S2.03
[ToolTip] => Tecnologia de Computadores (TP)
Ano 1 - rvasco - S38:51, 2 - A.S2.03 - 18:00 - 20:00
[Height] => 80
[Left] => 0
[BarColor] => Blue
[PartEnd] => October 1, 2013 20:00:00 +0000
[BackgroundColor] => #FFC37B
[Tag] =>
[DayIndex] => 1
[DeleteEnabled] =>
[MoveEnabled] =>
[Value] => 0
[ClickEnabled] =>
[Start] => October 1, 2013 18:00:00 +0000
[BarStart] => 0
[Box] => 1
[Top] => 401
)
)
輸出我需要:
[30]=>(
[18:00] => (
[0] => 'Prog 1 (PL1) - sonia.luz - S38:51, 2 - LAI5.DEI (D.S.01.16)',
[1] => 'Prog 1 (PL2) - vitor.tavora - S38:51, 2 - LAI3.DEI (DS.01.09)'
)
)
[1]=>(
[18:00]=>(
[0]=>'TComp (TP) - rvasco - S38:51, 2 - A.S2.03'
)
)
「Prog 1(PL1)」和「Prog 1(PL2)」是否符合9月30日結束於21:00的標準?你希望如何解決這個碰撞? – Ultimater
這可能是這樣的: »月»»天[30] =>( [21:00] =>( [0] => 「PL1」 [1] => 「PL2」 ) »»»一天中的[1] =>( [18:00] =>( [0] =>「TCOMP(TP)」 ) ) – user2061186