Home >php教程 >php手册 >php身份证号码检查类实例

php身份证号码检查类实例

WBOY
WBOYOriginal
2016-06-06 20:03:181441browse

这篇文章主要介绍了php身份证号码检查类,涉及php正则匹配与数组遍历的相关技巧,需要的朋友可以参考下

本文实例讲述了php身份证号码检查类。分享给大家供大家参考。具体如下:

idx[$i]+$this->idy[$i]*9+$ch[1]*8+$ch[2]*7+$ch[3]*6+$ch[4]*5+$ch[5]*4+$ch[6]*3+$ch[7]*2+$ch[8]*1+$ch[9]*1; $id = (($id % 10) == 0) ? TRUE : FALSE; return $id; // 导入检查公式 END } else return 0; } } ?>

希望本文所述对大家的php程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn