Define :
filter_var_array(array, options, add_empty)
Parameters
value |
Required. Specify an array with string keys containing the data to filter. |
options |
Optional. Specify an array of filter arguments. A valid array key is a variable name, and a valid value is a filter name or ID, or an array specifying the filter, flags and options. This parameter can also be a single filter name/ID; then all values in the input array are filtered by the specified filter. See the filter list. |
add_empty |
Optional. If set to true, adds missing keys as null to the return value. Default is true. |
GIven below example shows the usage of filter_var_array :
Output :
Array
(
[name] => Web Designing House
[age] => 25
[email] =>
)