filter_input_arrayGets external variables and optionally filters them Description
arrayfalsenull filter_input_array(int
$type , arrayint $options = FILTER_DEFAULT , bool $add_empty = true )This function is useful for retrieving many values without repetitively calling filter_input. Parameters
Return Values
An array containing the values of the requested variables on success.
If the input array designated by
An array value will be Examples
Example #1 A filter_input_array example
The above example will output: array(6) { ["product_id"]=> string(17) "libgd%3Cscript%3E" ["component"]=> array(1) { [0]=> int(10) } ["version"]=> string(6) "2.0.33" ["doesnotexist"]=> NULL ["testscalar"]=> int(2) ["testarray"]=> array(4) { [0]=> int(2) [1]=> int(23) [2]=> int(10) [3]=> int(12) } } Notes
|