How do I show age from a birthdate?
Posted: Mon May 27, 2002 7:14 am
Hi.
I need to show how old a person is from his/her birthdate.
The birthdates come from a mysql db.
I found this script on php.net, but its not working 100%
----------
So I would appreciate it, if someone had a solution for me.
Blade
I need to show how old a person is from his/her birthdate.
The birthdates come from a mysql db.
I found this script on php.net, but its not working 100%
-----
Code: Select all
<?php
$nowdate = mktime(0,0,0,date("m"),date("d"),date("Y"));
$birthday = mktime(0,0,0,"05","22","1982");
$age=intval(($nowdate-$birthday)/(60*60*24*365));
?>So I would appreciate it, if someone had a solution for me.
Blade