PHP Date Function

Associate
Joined
15 Apr 2008
Posts
1,031
Location
West Didsbury, Manchester
Ok, I cannot fathom this at all. In PHP the date function works with months starting from 1 according to PHP.net.

Now when I do this:

Code:
$originalMonth = date("F", mktime(0,0,0,6,0,2011,0));
echo("<a href=''>".$originalMonth." (".$row['postCount'].")</a><br />");

I get:
Code:
 May (0)

Any ideas, or could someone check this for me to see if it is my setup that's borked.

Cheers!
 
Code:
$originalMonth = date("F", mktime(0,0,0,6,1,2011,0));
echo("<a href=''>".$originalMonth." (".$row['postCount'].")</a><br />");

Try that, you have mktime(0,0,0,6,0,2011,0));
 
Back
Top Bottom