Define :
In this tutorial we have learned about PHP filter_input_array() Function.The filter_input_array() function is inbuilt function in php.This function is used to gets external variables and optionally filters them. This function is useful for retrieving many values without repetitively calling filter_input().
filter_input_array(type, options, add_empty)
type |
Required. Specify the input type. It can be one of the following:
|
Example :
In the example below, filter_input_array() function is used to filter three POST variables. The received POST variables are 'name', 'age' and 'email'.
Output :
Array
(
[name] => John Smith
[age] => 25
[email] => John@example.com
)