So, given:
Array
(
[person.ics] => Array
(
[0] => Array
(
[BEGIN] => VEVENT
[DTSTART] => 20071207T153000Z
[DTEND] => 20071208T020000Z
[DTSTAMP] => 20090215T052445Z
[UID] => rtdh87s0o3keceuhf4oot8hrng@google.com
[CLASS] => PRIVATE
[CREATED] => 20090215T003047Z
[DESCRIPTION] =>
[LAST-MODIFIED] => 20090215T003047Z
[LOCATION] =>
[SEQUENCE] => 0
[STATUS] => CONFIRMED
[SUMMARY] => Misc 4
[TRANSP] => OPAQUE
[END] => VEVENT
)
If this event does not contain the 'DTSTART' key, i want to break this inner foreach
foreach ($iCaltoArray as $key => $inner_array){
foreach ($iCaltoArray[$key] as $event => $innerarray2){
if (array_key_exists('DTSTART', $event)){
// continue on merry way
} else {
break;
}
But I can't get this to work!
Any help pleeease?
( trying to get rid of the: "Undefined index: DTSTART" errors in my php log file! )