希望有人可以幫助我在這裏。 我有2個給定的開始和結束時間的數組。 我需要做的是,以檢查是否從陣列1的時間範圍是在陣列2的範圍,如果它是在其範圍內必須從陣列中移除2.PHP比較2時間範圍的陣列
陣列1:
Array (
[0] => Array ([from] => 10:00:00 [to] => 10:30:00)
[1] => Array ([from] => 11:00:00 [to] => 11:45:00)
[2] => Array ([from] => 14:00:00 [to] => 15:00:00)
[3] => Array ([from] => 16:30:00 [to] => 17:00:00)
)
陣列2:
Array (
[0] => Array ([from] => 09:30 [to] => 10:00)
[1] => Array ([from] => 10:15 [to] => 10:45)
[2] => Array ([from] => 11:00 [to] => 11:30)
[3] => Array ([from] => 11:45 [to] => 12:15)
[4] => Array ([from] => 12:30 [to] => 13:00)
[5] => Array ([from] => 13:15 [to] => 13:45)
[6] => Array ([from] => 14:00 [to] => 14:30)
[7] => Array ([from] => 14:45 [to] => 15:15)
[8] => Array ([from] => 15:30 [to] => 16:00)
[9] => Array ([from] => 16:15 [to] => 16:45)
[10] => Array ([from] => 17:00 [to] => 17:30)
[11] => Array ([from] => 17:45 [to] => 18:15)
[12] => Array ([from] => 18:30 [to] => 19:00)
[13] => Array ([from] => 19:15 [to] => 19:45)
)
希望有某人那裏誰可以幫助我。 在此先感謝您的幫助!
你試過了什麼? – Xlander 2014-10-31 06:40:05