<?php
/**
* Get Age
* @var string YYY-MM-DD // MYSQL Format
* @return int age
**/
function getAge($mysql_date) {
list($y,$m,$d) = explode("-",$mysql_date);
$age = date('Y')-$y;
date('md')<$m.$d ? $age--:null;
return $age;
}
?>