PHP date() and strtotime() return wrong months on 31st
问题 I\'m using date() and strtotime() functions to display the next 3 months in a dropdown list. PHP Code: echo date(\"m/Y\",strtotime(\"+0 months\")); echo date(\"m/Y\",strtotime(\"+1 months\")); echo date(\"m/Y\",strtotime(\"+2 months\")); However, if the script is running when the server date is on 30th or 31st, the next month, which is Feburary, will be displayed as March instead. i.e. the script above is supposed to return 01/2012 02/2012 03/2012 But, instead of that, it actually displays 01