i0ni on 09/01/11
Last Edited at 09/01/11 05:58pm
# 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.