* 通过身份证获取性别类型
* @param type $card
* @param 1 男 2 女
* @return int
*/
function get_sex_by_cardsn($sn)
{
$no = substr($sn, 17, 17);
if ($no % 2 == 0)
{
return 2;
}
else
{
return 1;
}
}
$sex = get_sex_by_cardsn(610521199012080115);
本文地址:https://www.phpicu.com/article.php?id=58