- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
filter_id() function in PHP
The filter_id() function returns the filter ID of provided filter name.
Syntax
filter_id(filtername)
Parameters
filtername − The name of filter to get the ID from.
Return
The filter_id() function returns filter ID on success or FALSE, if the filter does not exist.
Example
<?php foreach (filter_list() as $id =>$filter) { echo $filter . "=" . filter_id($filter) . "<br>"; } ?>
Output
The following is the output.
int = 257 boolean = 258 float = 259 validate_regexp = 272 validate_domain = 277 validate_url = 273 validate_email = 274 validate_ip = 275 validate_mac = 276 string = 513 stripped = 513 encoded = 514 special_chars = 515 full_special_chars = 522 unsafe_raw = 516 email = 517 url = 518number_int = 519 number_float = 520 magic_quotes = 521 callback = 1024
Advertisements