PHP strtotime for June returns July

前端 未结 3 2106
予麋鹿
予麋鹿 2021-01-17 23:09

I\'m stumped as to why the following PHP strtotime function returns \'07\' as the month number, rather than \'06\' when $monthToGet = \'June\':

$monthToGet =         


        
3条回答
  •  轮回少年
    2021-01-17 23:43

    Fixed with :

    $monthToGet = '1 '. $_GET['mon'];
    

    But I still don't get why, since "m" is a valid date format

提交回复
热议问题