Easy Tutorial
❮ Func Zip Entry Name Func Ftp Systype ❯

PHP filter_var_array() Function



Definition and Usage

The filter_var_array() function retrieves multiple variables and filters them.

This function is useful for filtering multiple values without repeatedly calling filter_var().

If successful, it returns the values of the requested variables in an array. If it fails, it returns FALSE.

Syntax

Parameter Description
array Required. Specifies an array with string keys containing the data to be filtered.
args Optional. Specifies an array of filter parameters. Valid array keys are variable names, and valid values are filter IDs or arrays that specify the filter, flags, and options. This parameter can also be a single filter ID; in this case, all values in the input array are filtered by the specified filter. Filter IDs can be either the ID name (e.g., FILTER_VALIDATE_EMAIL) or the ID number (e.g., 274).

Tips and Notes

Tip: See the Complete PHP Filter Reference Manual for filters that can be used with this function.


Example

The output of the code is as follows:


❮ Func Zip Entry Name Func Ftp Systype ❯