I have the following array and would like to know what the best way would be of validating and santizing this array to make sure only integers are allowed?
if(is_array($_POST['taxonomy'])) {
$term_ids = array_map('esc_attr', $_POST['taxonomy']);
}
Which looks like this when printed:
Array
(
[0] => 13
[1] => 12
)
I know the esc_attr isn't very secure so would like something a bit more beefed up.
Any help would be great.
Cheers,
Dave