filter_input_array

Gets external variables and optionally filters them

&reftitle.description; ``array``false``null```filter_input_array` `int` `type` ``array``int```options` `FILTER_DEFAULT` `bool` `add_empty`&true;

This function is useful for retrieving many values without repetitively calling `filter_input`.

&reftitle.parameters;

`type`

- One of the `INPUT_`*`` constants.

  The content of the superglobal that is being filtered is the original "raw" content provided by the SAPI, prior to any user modification to the superglobal. To filter a modified superglobal use `filter_var_array` instead.

&reftitle.returnvalues;

On success, an &array; containing the values of the requested variables.

On failure, &false; is returned. Except if the failure is that the input array designated by `type` is not populated where &null; is returned if the `FILTER_NULL_ON_FAILURE` flag is used.

Missing entries from the input array will be populated into the returned &array; if `add_empty` is &true;. In which case, missing entries will be set to &null;, unless the `FILTER_NULL_ON_FAILURE` flag is used, in which case it will be &false;.

An entry of the returned &array; will be &false; if the filter fails, unless the `FILTER_NULL_ON_FAILURE` flag is used, in which case it will be &null;.

&reftitle.notes;

There is no `REQUEST_TIME` key in `INPUT_SERVER` array because it is inserted into the `$_SERVER` later.

&reftitle.seealso;

- `filter_input`
- `filter_var`
- `filter_var_array`
- Validation filters `FILTER_VALIDATE_`*``
- Sanitization filters `FILTER_SANITIZE_`*``