Functions::is_indexed_array($arr)

Version 4

Is array with int keys

Check if value is array and it has int keys.

Return value

Bool

Arguments

$arr
Value to check

Full documentation

Check if $arr is associative array:

$arr = Array( 'title' => 'Title' );
if ( is_indexed_array($arr) ){
    // is false
}

$arr = Array( 'Title' );
if ( is_indexed_array($arr) ){
    // is true
}