filter_input_arrayGets external variables and optionally filters them Description
mixed filter_input_array
( int
$type
[, mixed $definition
[, 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, or Examples
Example #1 A filter_input_array example
<?phpThe above example will output:
array(6) {
["product_id"]=>
array(1) {
[0]=>
string(17) "libgd%3Cscript%3E"
}
["component"]=>
array(1) {
[0]=>
int(10)
}
["versions"]=>
array(1) {
[0]=>
string(6) "2.0.33"
}
["doesnotexist"]=>
NULL
["testscalar"]=>
bool(false)
["testarray"]=>
array(1) {
[0]=>
int(2)
}
}
Changelog
Notes
|