Automattic\WooCommerce\Internal
RestApiUtil::is_associative()
Is an array sequential or associative?
Method of the class: RestApiUtil{}
No Hooks.
Return
true|false
. True if the array is associative, false if it's sequential.
Usage
$result = RestApiUtil::is_associative( $array );
- $array(array) (required)
- The array to check.
RestApiUtil::is_associative() RestApiUtil::is associative code WC 8.7.0
private static function is_associative( array $array ) { return array_keys( $array ) !== range( 0, count( $array ) - 1 ); }