Possible Duplicate:
PHP Arrays: A good way to check if an array is associative or sequential?
What would be the most performant way of checking if an array is associative or not in PHP?
Possible Duplicate:
PHP Arrays: A good way to check if an array is associative or sequential?
What would be the most performant way of checking if an array is associative or not in PHP?
If it is for the purpose of iterating through an array, to be safe you can always use foreach.
I think you are looking for - http://stackoverflow.com/questions/173400/php-arrays-a-good-way-to-check-if-an-array-is-associative-or-sequential