Why is my PHP code giving me the wrong result the following code:
date_default_timezone_set('UTC');
echo date('d-m-Y');
Is working and producing:
30-01-2013
However this code:
date_default_timezone_set('UTC');
echo date('d-m-Y',strtotime("+1 month"));
Is producing this date:
02-03-2013
Instead of:
28-02-2013
However I only need the month number.
Solved by using
Code:
As I only needed the month number.