I have a page that uses some variables for the date.
y for year
m for month
and when i try to format m so it prints out the name of the month and not just the 2 digit number.
My Code:
<?php echo date('F', $_REQUEST['m'])." ".$_REQUEST['y']; ?>
What am I doing wrong? For some reason it keeps printing out the current month (which is december).
You need to do like:
echo date("F",mktime(0, 0, 0, $m, 1, $y));Ref: http://php.net/manual/en/function.date.php