function getAgeByID($id){ if(empty($id)) return ''; $date=strtotime(substr($id,6,8)); $today=strtotime('today'); $diff=floor(($today-$date)/86400/365); $age=strtotime(substr($id,6,8).'+'.$diff.'years')>$today?($diff+1):$diff; return $age;}