PHP determines the bank based on the bank card number, and php determines the bank card number
Download bankList. php 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 has not been entered ';} bankInfo ('20140901', $ bankList );
Banklist. php download
The above is all the content of this article. I hope you will like it.