Try this function
// Total days, include start and end date
function days_between($date_from, $date_to)
{
$a_date_from = explode("-",$date_from);
$a_date_to = explode("-",$date_to);
$d1 = mktime(0,0,0,$a_date_from[1],$a_date_from[2],$a_date_from[0]); //midnite of date_from
$d2 = mktime(0,0,0,$a_date_to[1],$a_date_to[2],$a_date_to[0]); //midnite of date_to
return (round(($d2 - $d1) / 86400) + 1); //difference in seconds between days divided by 86400 (seconds in day) gives you difference in days
}
Should be self-explanatory