/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// input $date string format: YYYY-MM-DD function age($date){ if ($day_diff < 0 || $month_diff < 0) $year_diff--; return $year_diff; }
URL: http://www.barattalo.it/2010/02/10/php-how-to-calculate-age-from-date-of-birth/