Now that timestamps have been reviewed to show you some easy way to take two days and return a total number of days. The example below will take an arbitrary date of April 4, 2008 and May 12, 2008 (the current date I wrote the article)
$time_A = strtotime("April 4, 2008"); $time_B=strtotime(now); $numdays=intval(($time_B-$time_A)/86400)+1;
The number of seconds in a day is 86400 and the calculations usually shorts you a day so thats why we add a 1. This is do the fact the now() returns the current time which is not a complete day.