I have a date value from database as 12-12-2015
I tried the below code
$date = "12-12-2015";
echo date("M d, Y", strtotime($date));
it gives an output as Dec 12, 2015
, but i want December 12, 2015
as output
Thanks on advance
I have a date value from database as 12-12-2015
I tried the below code
$date = "12-12-2015";
echo date("M d, Y", strtotime($date));
it gives an output as Dec 12, 2015
, but i want December 12, 2015
as output
Thanks on advance
You are just near to Output. In date format function use F for Full month Display.
$date = "12-12-2015";
echo date("F d, Y", strtotime($date));
Try this:
$date = "12-12-2015";
echo date("F d, Y", strtotime($date));
Reference Link:http://php.net/manual/en/function.date.php