0
Get difference of two times
I use below code to get difference of start time and end time. $totalTime = strtotime($endTime)-strtotime($startTime); But some time it return 00:00:00 Why this happens? Please help.
1 Respuesta
0
in PHP 5 and up you can use:
<?php
$date = new DateTime('2000-01-20');
$date->sub(new DateInterval('P10D'));
echo $date->format('Y-m-d') . "\n";
?>