In my current month variable have = 2019-12
in
<p class="col-md-1"><?php echo $cm['month']; ?></p>
I want to show DEC 2019
In my current month variable have = 2019-12
in
<p class="col-md-1"><?php echo $cm['month']; ?></p>
I want to show DEC 2019
Use M Y
in date()
for the format, and strtotime
for input date
echo date("M Y", strtotime('2019-12'));
<?php
$date = "2019-12";
echo date("M Y", strtotime($date)); // Output : Dec 2019
?>