我想除了DTSTART &從陣列中去除一切DTEND選擇某些元素從一個數組
所以我想轉換此:
Array
(
[0] => Array
(
[DTEND] => 20130417
[DTSTART] => 20130403
[UID] => [email protected]
[DESCRIPTION] => CHECKIN: 04/08/2012\nCHECKOUT: 04/17/2012\nNIGHTS: 14\nPHO
[NE] => +1 504 914 0591\nEMAIL: [email protected]\nPROPERTY: Breathtaking views over the lake\n
[SUMMARY] => Name here (ED5ASC)
[LOCATION] => Breathtaking views over the lake
)
[1] => Array
(
[DTEND] => 20131231
[DTSTART] => 20131226
[UID] => [email protected]
[DESCRIPTION] => CHECKIN: 12/26/2013\nCHECKOUT: 12/31/2013\nNIGHTS: 5\nPHON
[E] => +44 7843 387767\nEMAIL: [email protected]\nPROPERTY: Breathtaking views over the lake\n
[SUMMARY] => Name here (JrtyKW9)
[LOCATION] => Breathtaking views over the lake
)
[2] => Array
(
[DTEND] => 20121123
[DTSTART] => 20121117
[UID] => [email protected]
[SUMMARY] => Not available
)
)
看像這樣:
Array
(
[0] => Array
(
[DTEND] => 20130417
[DTSTART] => 20130403
)
[1] => Array
(
[DTEND] => 20131231
[DTSTART] => 20131226
)
)
[2] => Array
(
[DTEND] => 20121123
[DTSTART] => 20121117
)
)
我已經搜索了一些選項,但我需要爲了能夠選擇這兩個元素並放棄其餘的元素,我將使用具有不同值的不同數組,因此不能僅指定要移除的元素,因爲它們會有所不同。
非常感謝,我正在嘗試像數組過濾器和數組搜索的東西,但你的答案就是這麼簡單:) – happypete