Suppose my age on today is 20 years 11 months and 3 days 0r 20 years 3 months 15 days. I want to fetch my age with completed years. What I mean is fetch my age 20 years not 21. I want this code in PHP. What I already have is
if ($_SESSION['type_of_coverage']=='1') {
$d11=explode("/",$_SESSION['birth_date1']);
} else if ($_SESSION['type_of_coverage']=='2') {
$d11=explode("/",$_SESSION['birth_date2']);
} else if ($_SESSION['type_of_coverage']=='3') {
$d11=explode("/",$_SESSION['birth_date3']);
}
$date11 = mktime(0,0,0,$d11[1],$d11[0],$d11[2]);
$date22 = mktime(0,0,0,date("m"),date("d"),date("Y"));
$dateDiff1 = $date11 - $date22;
echo $age = abs(number_format(($dateDiff1/(60*60*24))/365,0));
Thanks.. pardon for my english