How to check if PHP array is associative or sequential?
You have asked two questions that are not quite equivalent: Firstly, how to determine whether an array has only numeric keys Secondly, how to determine whether an array has sequential numeric keys, starting from 0 Consider which of these behaviours you actually need. (It may be that either will do for your purposes.) The first … Read more