Get month of a given date which is stored in a PHP time variable in 'Y-m-d' format
Try date_parse_from_format():
date_parse_from_format()
$date = "2010-08-12"; $d = date_parse_from_format("Y-m-d", $date); echo $d["month"];
2.1m questions
2.1m answers
60 comments
57.0k users