I have in my $_POST
array a variable without keys: (This is from an input form with name[]
).
var_dump($_POST)
looks like this:
array(2) {
["name1"]=>
string(1) "ttt"
["name2"]=>
array(1) {
[0]=>
string(2) "test"
}
}
How can I correctly use filter_input_array
on this array?
For example, I need use FILTER_VALIDATE_INT
to all name2
elements.
UPD: print_r
of $_POST
:
Array
(
[name1] => ttt
[name2] => Array
(
[0] => test
)
)