helpers\BaseArrayHelper keyExists()

keyExists() public static method

Checks if the given array contains the specified key.

This method enhances the array_key_exists() function by supporting case-insensitive key comparison.

public static boolean keyExists ( $key, $array, $caseSensitive = true )
$key string

The key to check

$array array

The array with keys to check

$caseSensitive boolean

Whether the key comparison should be case-sensitive

return boolean

Whether the array contains the specified key

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

Please login to continue.