I have a date that I'm getting from a date picker. It is returning an array() like the following...
array(12) {
["year"]=> int(2016)
["month"]=> int(11)
["day"]=> int(24)
["hour"]=> bool(false)
["minute"]=> bool(false)
["second"]=> bool(false)
["fraction"]=> bool(false)
["warning_count"]=> int(0)
["warnings"]=> array(0) { }
["error_count"]=> int(0)
["errors"]=> array(0) { }
["is_localtime"]=> bool(false)
}
I tried to get just the month or the year out of this array() utilizing a foreach() but no success with it.
How can I iterate through this array() and extract the year or month independently?
$variable['year']or$variable['month']