public static function isIndexed(array $array)
    {
        $i = 0;
        foreach (array_keys($array) as $k) {
            if ($k !== $i) {
                return false;
            }
            $i++;
        }
        return true;
    }
public static function isIndexed(array $array)
    {
        $i = 0;
        foreach (array_keys($array) as $k) {
            if ($k !== $i) {
                return false;
            }
            $i++;
        }
        return true;
    }
public static function isIndexed ( array $ array ) { $ i = 0 ; foreach ( array_keys ( $ array ) as $ k ) { if ( $ k !== $ i ) { return false ; } $ i ++ ; } return true ; }
Checks if an array is indexed.
Checks if an array is indexed .