Php have function for plus date or not ?
normally, if i want to plus date with 5 day i usually user this code.
<?PHP
$now = date("Y-m-d");
$now_explode = explode("-", $now);
$now_year = $now_explode[0];
$now_month = $now_explode[1];
$now_date = $now_explode[2];
$now_date = $now_date + 5;
$next_five_date = $now_year."-".$now_month."-".$now_date;
echo $next_five_date;
?>
But i have some issue eg: if $now = "2016-12-31";
. When i run my code. Result will be 2016-12-36
Then i have to check month, check year for date in Feb month.
It's labyrinthine, so i want to know php have general function for plus date in to date ?