0

I have facing trouble to print date and month,I need to print January-2016 not Jan-2016.

I have tried <? echo date("Y-M");?>

Please suggest.

Divakarcool
  • 473
  • 6
  • 20

3 Answers3

3

Try this for full month name

<?php echo date("F-Y"); ?>  //January-2016
Syed mohamed aladeen
  • 6,507
  • 4
  • 32
  • 59
  • You are an established user Syed. Surely you know this is a duplicate? Instead of answering the question it is better to flag it as such :) – NSNoob Jan 08 '16 at 06:02
0

Try this this help you

echo date("Y-m");
shiva chauhan
  • 410
  • 2
  • 7
0

For January-2006

echo date('F-Y');

For 2006-January

echo date("Y-F");

Y = year in digits

F = full month text

Vegeta
  • 1,319
  • 7
  • 17