isIndexed() public static method
Returns a value indicating whether the given array is an indexed array.
An array is indexed if all its keys are integers. If $consecutive is true, then the array keys must be a consecutive sequence starting from 0.
Note that an empty array will be considered indexed.
| public static boolean isIndexed ( $array, $consecutive = false ) | ||
|---|---|---|
| $array | array |
The array being checked |
| $consecutive | boolean |
Whether the array keys must be a consecutive sequence in order for the array to be treated as indexed. |
| return | boolean |
Whether the array is associative |
Please login to continue.