I found this age calculator by Weedpacket here in phpbuilder, because the one I'm using is totally out of track.
Upon testing Weedpacket's age calculator, it seems that it works fine. However, it has bug (correct me if I'm wrong). Here it is :
<?php
$year = 1987;
$month = 1;
$day = 2;
$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--;
}
echo $age;
?>
The output is 23 which is right (Today is January 2, 2010 here in Philippines). However if I changed the value of $day to 3, the output is 22, which is wrong, right?