Possible duplicate:PHP arrays: a good way to check if an array is associative or sequential?
What would be the most efficient way to check if an array is associative or not in PHP?
If it is necessary to iterate through an array to be safe, you can always use foreach.
is_int(key($someArray))
PHP .