$startTimeStamp = strtotime("2012/03/01");
$endTimeStamp = strtotime("2012/03/15");
$timeDiff = abs($endTimeStamp - $startTimeStamp);
$numberDays = $timeDiff/86400; // 86400 seconds in one day
// and you might want to convert to integer
$numberDays = intval($numberDays);
1 comment: