How to calculate (show, print) people (human) age using php?
How to calculate (show, print) people (human) age using php?
function prigVozrFizVau($darr,$dob){
$dateOfBirth = date("Y-m-d",strtotime($dob));
$today = date("Y-m-d",strtotime($darr));
$diff = date_diff(date_create($dateOfBirth), date_create($today));
return $diff->format('%y');
}