add 7 days to date php

88

add 7 days to date php -

$date = "Mar 03, 2011";
$date = strtotime($date);
$date = strtotime("+7 day", $date);
echo date('M d, Y', $date);

php add days to date -

$start_date = "2015/03/02";  
$date = strtotime($start_date);
$date = strtotime("+7 day", $date);
echo date('Y/m/d', $date);

Add days to date in PHP -

$date = new DateTime('2020-11-24');
$date->add(new DateInterval("P9D"));

echo $date->format('Y-m-d');

Comments

Submit
0 Comments