PHP Calculating future date by adding days to a variable date

前端 未结 6 1785
一整个雨季
一整个雨季 2020-12-10 05:40

I was looking at this post, and it is close to what I need: PHP - How to count 60 days from the add date

However, in that post, the calculation is performed by addi

6条回答
  •  -上瘾入骨i
    2020-12-10 06:39

    Suppose today's date is

    date_default_timezone_set('Asia/Calcutta');
    $today=date("Y-m-d");
    

    And i can add 10 days in current date as follows :

    $date_afte_10_days = date('Y-m-d', strtotime("$today +10 days"));
    

提交回复
热议问题