Here's how i use it to check if array is associative or not:
<?php
if (array_keys($arr)===range(0, sizeof($arr)-1)) {
// not associative array
} else {
// associative array
}
?>
Here's how i use it to check if array is associative or not:
<?php
if (array_keys($arr)===range(0, sizeof($arr)-1)) {
// not associative array
} else {
// associative array
}
?>