filter_var_arrayGets multiple variables and optionally filters them Description
arrayfalsenull filter_var_array(array
$array , arrayint $options = FILTER_DEFAULT , bool $add_empty = true )This function is useful for retrieving many values without repetitively calling filter_var. Parameters
Return Values
An array containing the values of the requested variables on success, or Examples
Example #1 A filter_var_array example
The above example will output: array(6) { ["product_id"]=> string(17) "libgd%3Cscript%3E" ["component"]=> array(1) { [0]=> int(10) } ["versions"]=> string(6) "2.0.33" ["doesnotexist"]=> NULL ["testscalar"]=> bool(false) ["testarray"]=> array(1) { [0]=> int(2) } } |