Source Code:
(back to article)
<?php $array = ['a' => 1, 'b' => 2, 'c' => 3]; $keys = array_keys($array); if ($keys !== array_keys($keys)) { // associative array echo 'associative array'; } else { // sequential array echo 'sequential array'; }
Result:
Report an issue