note 61579 deleted from function.mktime by mazzanet
| From: | mazzanet@php.net | Date: | Tue, 07 Feb 2006 10:31:18 +0000 |
| Subject: | note 61579 deleted from function.mktime by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-103178@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Here's a way to find your age. I couldn't make the other examples work, so I made this
one.
<?PHP
//Birthday in this format: year-month-day
$b_day = '1983-11-26';
//display your age to a nice round decimal using floor()
echo floor((strtotime(date("Y-m-d")) - strtotime($b_day)) / (60 * 60 * 24 * 365));
?>
I hope you guys have great luck with this one! :)
Anna Marie