Ok this is from Weedpackets code which didnt work correctly.
You can see his version of it here http://www.phpbuilder.com/board/showthread.php?s=&threadid=10253351&highlight=age#post10410290
function checkCurAge($year,$month,$day='') {
$day=(empty($day))?'1':$day;
list($this_year, $this_month, $this_day) = explode(' ',date('Y n j'));
$age = $this_year - $year;
if ($month>$this_month||($this_month==$month&&$this_day<$day)) {
$age--;
}
return $age;
}
ive tested it to make sure it didnt have the same bug as in weeds which was if the $month==$this_month it didnt check if the day was equal too correctly and if it were on the same day e.g.
2004-07-08 and the users bday was
1990-07-08 it would say they were 13 but they are actually 14.