I currently have an variable that contains the below array. Each part of the array is user submitted how would I go about checking whether each part of the array is an integer value and if it's not then dropping that part of the array?
Array ( [0] => 3 [1] => 4 [2] => 17 [3] => 5 [4] => 6 [5] => 11 [6] => 7 [7] => 8 [8] => 9 [9] => 15 [10] => 16 [11] => 18 [12] => 10 [13] => 12 [14] => 13 [15] => 14 )
I'm storing the array inside $forums and I've tried array_map("ctype_digit", $forums);
array_filterctype_digit()returns true only for strings consisting entirely of digits ... Terminology is important, you need to be precise in explaining what you want first.