php get month from date string code example
Example 1: php grab month from date
$month = date("m",strtotime($mydate));
Example 2: get current month php
current month
//half name in words
date('M');
//full name in words
date('F');
//number
date('m');
Example 3: datetime get month php
$dateTime = new DateTime();
$month = $dateTime->format('m');