PHP: get next 13 dates from date?

后端 未结 3 1286
遇见更好的自我
遇见更好的自我 2021-01-20 15:36

I am trying to get an array of a date plus the next 13 dates to get a 14 day schedule starting from a given date.

here is my function:

$time = strtot         


        
3条回答
  •  旧时难觅i
    2021-01-20 15:52

    I recommend something like:

    for($i=1;$i<=14;$i++){
         echo("$i day(s) away: ".date("m/d/Y",strtotime("+$i days")));
    }
    

提交回复
热议问题