php根据身份证号码计算年龄
代码:
<?
(empty($id)) ''=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?>
代码:
<?
(empty($id)) ''=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?>
PHP之友评论