filter_input_array()
filter_input_array - Gets external variables and optionally filters them
Syntax
mixed filter_input_array (
int $type,
mixed $definition)
Arguments
- type - One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, INPUT_ENV, INPUT_SESSION (not implemented yet), or INPUT_REQUEST (not implemented yet).
- definition - An array defining the arguments. A valid key is a string containing a variable name and a valid value is either a filter type, or an array optionally specifying the filter, flags and options. If the value is an array, valid keys are filterwhich specifies the filter type, flagswhich specifies any flags that apply to the filter, and optionswhich specifies any options that apply to the filter. See the example below for a better understanding. This parameter can be also an integer holding a filter constant. Then all values in the input array are filtered by this filter.
Description
This function is useful for retrieving many values without repetitively calling filter_input().
Version
PHP 5.2.0
Return value
An array containing the values of the requested variables on success, or FALSE on failure. An array value will be FALSE if the filter fails, or NULL if the variable is not set. Or if the flag FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is not set and NULL if the filter fails.