Home  >  Article  >  Backend Development  >  Summary of filter_id function definition and usage

Summary of filter_id function definition and usage

巴扎黑
巴扎黑Original
2017-06-11 17:34:401755browse

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

1. Recommended articles about php filter_id() function

Summary of filter_id function definition and usage

Introduction: The 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 each filter for possible flags and...

2. filterconfig PHP filter_var function Filter function

# Introduction: filterconfig:filterconfig PHP filter_var function Filter function: 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 each filter possible

3. 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

4. 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_

5. 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)

6. 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 Summary of filter_id function definition and usage. 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