I have a project where I can show current date and time. After that I can show current date + 200 days after a date in PHP. I'm new in PHP programing
You can try something like this with DateTime()
<?php
$dt = new DateTime();
$currentDate = $dt->format("Y-m-d H:i:s");
$dt->add(new DateInterval("P200D"));
$futureDate = $dt->format("Y-m-d H:i:s");
echo $currentDate;
echo PHP_EOL;
echo $futureDate;
?>
Program Output
2018-04-27 17:11:57
2018-11-13 17:11:57
DEMO: https://eval.in/996235