I tried to get name of month in php:
$date = '2014-06-00';
echo $m = date('M', strtotime($date));
It gives me May month instead June.
I tried to get name of month in php:
$date = '2014-06-00';
echo $m = date('M', strtotime($date));
It gives me May month instead June.
This should work for you:
<?php
$date = '2014-06-00';
$monthNum = substr($date, 5, 2);
$dateObj = DateTime::createFromFormat('!m', $monthNum);
echo $monthName = $dateObj->format('F');
?>
Output:
June