advanced code snippet search
i0ni on 09/01/11
get php with AGE calculate
09/01/11 05:58pm
2 people have marked this snippet as a favorite
catrinhoguillermoj88gmailcom
# mounth-day-yearfunction getAge($date){$bday = explode("-", $date, 3);$bday = mktime(0,0,0,$bday[0],$bday[1],$bday[2]);$age = (int)((time()-$bday)/31556926 );return $age;} #eg:echo getage("03-27-1990"); # returns the age.
Report this snippet Tweet
Comment:
You need to login to post a comment.