HI,
use the difference in dates. From de date function page in the manual (www.php.net/date):
function DayDiff($StartDate, $StopDate)
{
// converting the dates to epoch and dividing the difference
// to the approriate days using 86400 seconds for a day
//
return (date('U', strtotime($StopDate)) - date('U', strtotime($StartDate))) / 86400; //seconds a day
}