我有一個日期數組,我想知道是否有可能搜索一個數組並刪除今天的日期之前的任何項目,並保持其餘?PHP比較今天日期與(多維)數組中的日期?
這裏是我的陣列
Array
(
[0] => Array
(
[date] => 2013-07-14
)
[1] => Array
(
[date] => 2013-08-31
)
[2] => Array
(
[date] => 2013-09-15
)
[3] => Array
(
[date] => 2013-10-12
)
[4] => Array
(
[date] => 2013-10-16
)
[5] => Array
(
[date] => 2013-10-19
)
[6] => Array
(
[date] => 2013-10-23
)
[7] => Array
(
[date] => 2013-10-26
)
[8] => Array
(
[date] => 2013-10-30
)
[9] => Array
(
[date] => 2013-09-07
)
[10] => Array
(
[date] => 2013-08-14
)
[11] => Array
(
[date] => 2013-08-24
)
[12] => Array
(
[date] => 2013-09-11
)
[13] => Array
(
[date] => 2013-09-28
)
[14] => Array
(
[date] => 2013-10-05
)
)
怎麼樣循環throgh和比較日期與實際所需的數據,並建立一個新的過濾數組? – Fabio
是的,完全有可能使用一些非常簡單的技術,其中大多數只涉及一個循環。你有嘗試過什麼嗎?你卡在哪裏? – deceze