another solution which is pretty simple:
either use strtotime() to turn a date into a timestamp or use mktime(); then divide the result by 86400 (the number of seconds in a day) and you will get the difference in days.
Example:
$day = 86400; // # of seconds in a day
// hour,minute,second,month,day,year for mktime
$smalldate = mktime(0,0,0,2,2,2003); // Feb 2 2003 00:00:00
$largedate = mktime(0,0,0,2,4,2003); // Feb 4 2003 00:00:00
$difference = $largedate - $smalldate;
// results in 172800
$days = $difference / $day; // days = 2
That there will also calculate how many days between two dates.
Of course the two dates MUST be after 12-31-1969 16:00:00