Answers for "a date to date how many days in php"

PHP
4

Get the number of days between two dates in PHP

$startDate = new DateTime("2019-10-27");
$endDate = new DateTime("2020-04-11");

$difference = $endDate->diff($startDate);
echo $difference->format("%a");
Posted by: Guest on January-14-2021
0

php date + 30 days

echo date('d/m/Y',strtotime('+30 days',strtotime(str_replace('/', '-', '05/06/2016')))) . PHP_EOL;
Posted by: Guest on July-30-2020

Browse Popular Code Answers by Language