Adding three months to a date in PHP

前端 未结 9 1129
我寻月下人不归
我寻月下人不归 2020-12-02 13:03

I have a variable called $effectiveDate containing the date 2012-03-26.

I am trying to add three months to this date and have been unsu

9条回答
  •  死守一世寂寞
    2020-12-02 13:26

    Following should work

    $d = strtotime("+1 months",strtotime("2015-05-25"));
    echo   date("Y-m-d",$d); // This will print **2015-06-25** 
    

提交回复
热议问题