嗨,我有這樣的結構數組。我想比較一下這種情況。Php Array多維聯想比較值
if(dataInto[0]>=MyDataTypeFromInput && dataOut[0]<=MyDataTypeFromInput && room[0]==MyIdRoom) {...}
改爲索引0,這必須在循環foreach中工作。所以比較索引[0]與索引[0] [1]與[1]等
這是怎麼回事?
[
'dataInto' => [
0 => '2016-07-14 14:50'
1 => '2016-03-24 14:00'
2 => '2016-03-03 06:30'
]
'room' => [
0 => 13
1 => 14
2 => 14
]
'dataOut' => [
0 => '2016-07-14 18:10'
1 => '2016-03-24 17:20'
2 => '2016-03-03 09:50'
]
]
謝謝隊友。它的工作;) – Demolog