Complete PHP Filter Reference
The filter_input_array() function gets multiple external variables (like form input) and filters them.
This function is useful for filtering several input variables without calling filter_input() over and over.
This function can get input from several sources:
Returns an array of filtered data on success, FALSE on failure.
| Parameter | Description |
|---|---|
| input_type | Required. Specifies the input type. See possible types in list above |
| filter_args | Optional. Specifies an array of filter arguments. A
valid array key is a variable name and a valid value is
a filter ID, or an array specifying the filter,
flags and options. This parameter can also be a single filter ID, if so, all values in the input array are filtered by the specified filter A filter ID can be an ID name (like FILTER_VALIDATE_EMAIL) or an ID number (like 274) |
Tip: Check the Complete PHP Filter
Reference for possible filters to use with this function.
In this example we use the filter_input_array() function to filter three POST variables. The received POST variables is a name, an age and an e-mail address:
The output of the code should be:
Complete PHP Filter Reference
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|