So lets start with the ways, we can add days into date by using PHP language. There couple of ways, first one is, If you are using PHP 5.3 or greter version then you can add days to date with DateInterval() function. And if you are using lower version than PHP 5.3 then you should use PHP inbuilt function date() and date() function also works in latest PHP versions.
$Date1 = '2019-04-10'; $date = new DateTime($Date1); $date->add(new DateInterval('P1D')); // Here P1D means a period of 1 day $Date2 = $date->format('Y-m-d');
and the second method is:
$Date = date('Y-m-d', strtotime("2019-04-10" . " + 1 day")); // Here +1 is used for adding 1 day into date. If you add -1 instead of +1 it will print 09-04-2019
Hope you will like this blog. Please let me know, your comments below.