<?PHP
// First Date: 1 January 2005
// Second Date: 27 January 2005
$first_date = MKTIME(12,0,0,1,1,2005);
$second_date = MKTIME(12,0,0,1,27,2005);
$offset = $second_date-$first_date;
ECHO FLOOR($offset/60/60/24) . " days";
// This will display: 26 days.
?>