Home >Backend Development >PHP Tutorial >Recommended articles about php filter_id() function

Recommended articles about php filter_id() function

怪我咯
怪我咯Original
2017-06-11 17:34:301107browse

filter_var() function filters variables through the specified filter. Returns filtered data if successful, false if failed. Syntax filter_var(variable, filter, options)variable: required. Specifies the variables to filter. filter: optional. Specifies the ID of the filter to use. (See FiltersID list below) options: Specifies an array containing flags/options. Check the possible flags and options for each filter. Copy the code The code is as follows: FiltersID name: Description FILTER_CALLBACK: Call a user-defined function to filter data. FILTER_SANITIZE_STRING: Remove tags, remove or encode special characters. FILTER_SANITIZE_STRIPPED: Alias ​​for "string" filter. FILTER_SANITIZE_ENCODED: URL-encode string, remove or encode special characters. FILTER_

1. filterconfig PHP filter_var function Filter function

Introduction: filterconfig:filterconfig PHP filter_var function Filter function: filter_var() The function filters variables through the specified filter. Returns filtered data if successful, false if failed. Syntax filter_var(variable, filter, options)variable: required. Specifies the variables to filter. filter: optional. Specifies the ID of the filter to use. (See FiltersID list below) options: Specifies an array containing flags/options. Check each filter possible

2. ID number PHP ID number verification function

Introduction: Identity ID number: ID number PHP ID number verification function: Copy the code as follows: function validation_filter_id_card($id_card) { if(strlen($id_card) == 18) { return idcard_checksum18($id_card); } elseif((strlen( $id_card) == 15)) { $id_card = idcard_15to18($id_card); retur

3. PHP ID number verification function_PHP tutorial

Introduction: PHP ID number verification function. Copy the code as follows: function validation_filter_id_card($id_card) { if(strlen($id_card) == 18) { return idcard_checksum18($id_card); } elseif((strlen($id_card) == 15)) { $id_

4. PHP function to verify whether the ID number is correct

Introduction: PHP function to verify whether the ID number is correct , the function code is as follows: function validation_filter_id_card($id_card){ if(strlen($id_card)==18){ return idcard_checksum18($id_card); }elseif((strlen($id_card)==15)){ $id_card=idcard_15to18 ($id_card)

5. PHP implements ID verification function

Introduction: Welcome to the Linux Community Forum, Interact and communicate with 2 million technical staff> Enter PHP to implement the ID verification function function validation_filter_id_card ($id_card) { if (strlen ($id_card) == 18) { return idcard_checksum18 ($id_card); } elseif ((strlen ( $id_card) == 15)) { $i

[Related Q&A recommendations]:

django - python sorting of null values deal with?

The above is the detailed content of Recommended articles about php filter_id() function. For more information, please follow other related articles on the PHP Chinese website!

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