$start = mktime(0, 0, 0, $fm, $fd, $fy);
$end = mktime(0, 0, 0, $em, $ed, $ey);
$days = (($end - $start)/(60*60*24)) + 1;
echo "No of days between two date ".$days."
fm indicate the first month fd is the first date fy is the first year
em end month ed is end date and ey is end year.
$start indicate the starting date
$end indicate the end date
In these format has like month date and year