通过身份证获取出生日期:
$birthday
=
substr
(
$sfz
,6,4).
"-"
.
,10,2).
,12,2);
通过身份证获取性别:
if
,16,1) % 2==0){
$xingbie
'女'
;
}
else
{
'男'