08-13-2008, 06:40 PM
|
#3 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
You can still use mktime to get accurate ages.
PHP Code:
function getAge ($month, $day, $year) {
$now = mktime( 0, 0, 0, date("n"), date("j"), date("Y") ); $then = mktime( 0, 0, 0, $month, $day, $year );
$age = floor((((($now - $then) / 60) / 60) / 24) / 365.25);
return $age;
}
|
|
|
|