php get month from number code example
Example 1: php grab month from date
$month = date("m",strtotime($mydate));
Example 2: datetime get month php
$dateTime = new DateTime();
$month = $dateTime->format('m');
Example 3: php convert month number to name
$monthNum = 3;
$dateObj = DateTime::createFromFormat('!m', $monthNum);
$monthName = $dateObj->format('F'); // March