helpers\BaseArrayHelper isAssociative()

isAssociative() public static method

Returns a value indicating whether the given array is an associative array.

An array is associative if all its keys are strings. If $allStrings is false, then an array will be treated as associative if at least one of its keys is a string.

Note that an empty array will NOT be considered associative.

public static boolean isAssociative ( $array, $allStrings = true )
$array array

The array being checked

$allStrings boolean

Whether the array keys must be all strings in order for the array to be treated as associative.

return boolean

Whether the array is associative

doc_Yii
2016-10-30 17:04:26
Comments
Leave a Comment

Please login to continue.