Add days to date in PHP- You can add any number of days to a given date using DateTime
‘s add method and the appropriate DateInterval
.
$date = new DateTime('2020-11-24');
$date->add(new DateInterval("P9D"));
echo $date->format('Y-m-d');
Add days to date in PHP- You can add any number of days to a given date using DateTime
‘s add method and the appropriate DateInterval
.
$date = new DateTime('2020-11-24');
$date->add(new DateInterval("P9D"));
echo $date->format('Y-m-d');