- round: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
function dateDiff($start, $end) {
$start = strtotime($start);
$end = strtotime($end);
$diff = $end - $start;
return round($diff / 86400);
}
echo dateDiff("2010-01-30", date('Y-m-d')).' d.' ;