Question: I'm trying to retrieve the month using `date`.

```
$year= 2012;
$mon = date( 'F', mktime(0, 0, 0, $month,$year) );

```

In the above code snippet, `$month` is dynamically incremented. I have used a while loop with `$month++`. But it doesn't give me the correct date.

For example, let's say I gave `$month=5` at the beginning, then it's incremented till `$month=12`. Then the output should be something like

```
May
June
July... 

```

but, it's output is:

```
November
December
January.....

```

why is this? Am I doing anything wrong here?

Answer: 
You forgot $date parameter. THe correct syntax of mktime is 

```
mktime($hour,$minute,$second,$month,$day,$year);

```

so in your example $year will be considered as 'date'

try something like

```
mktime(0,0,0,$month,1,$year);

```
there's an error in `mktime`: should be `mktime(0, 0, 0, $month, 1,$year)`, cause the 5th argument is `day`, but not the `year`