php calcute age ising birth year code example
Example: age php datetime
function get_age( $date ) {
$age = date('Y') - $date;
if (date('md') < date('md', strtotime($date))) {
return $age - 1;
}
return $age;
}
function get_age( $date ) {
$age = date('Y') - $date;
if (date('md') < date('md', strtotime($date))) {
return $age - 1;
}
return $age;
}