PHP implementation according to bank card number judgment Bank, PHP bank card Judge Bank
banklist.php please download at the end of the article
Header (' Content-type:text/html;charset=utf-8 '); Require_once (' banklist.php '); function Bankinfo ($card, $bankList) { $card _8 = substr ($card, 0, 8); if (Isset ($bankList [$card _8]) { echo $bankList [$card _8]; return; } $card _6 = substr ($card, 0, 6); if (Isset ($bankList [$card _6]) { echo $bankList [$card _6]; return; } $card _5 = substr ($card, 0, 5); if (Isset ($bankList [$card _5]) { echo $bankList [$card _5]; return; } $card _4 = substr ($card, 0, 4); if (Isset ($bankList [$card _4]) { echo $bankList [$card _4]; return; } Echo ' This card number information is not entered '; }
banklist.php Download
The above mentioned is the whole content of this article, I hope you can like.
http://www.bkjia.com/PHPjc/992548.html www.bkjia.com true http://www.bkjia.com/PHPjc/992548.html techarticle PHP Implementation According to the bank card number judgment Bank, PHP Bank card Judge Bank banklist.php please download the header (' Content-type:text/html;charset=utf-8 ') at the end of the article; Require_once ( ' banklist.php ') ...