Originally posted by perpetualshaun
I know that I can use the is_numeric thing on each value if I loop through all the values in the array, but I'm wondering if there is another way to do it?
not really, that's what i would do:
$array = array(1,2,3,4,5,6,7,8,9);
if (!count($array)) {echo 'the array has 0 indexes<br>';}
foreach ($array as $key => $value)
{
if (!is_numeric($value)) {echo 'index #' . $key . ' is not numeric';}
}