public static function doesArrayHaveValue(array &$array, $value, bool $ignoreCase = false): bool
    {
        if (!is_array($array) || empty($array)) {
            return false;
        }
        
        $valueToCheck = ($ignoreCase) ? strtolower($value) : $value;
        $arrayToCheck = ($ignoreCase) ? array_change_key_case($array) : $array;
        
        return in_array($valueToCheck, $arrayToCheck);
    }
public static function doesArrayHaveValue(array &$array, $value, bool $ignoreCase = false): bool
    {
        if (!is_array($array) || empty($array)) {
            return false;
        }
        
        $valueToCheck = ($ignoreCase) ? strtolower($value) : $value;
        $arrayToCheck = ($ignoreCase) ? array_change_key_case($array) : $array;
        
        return in_array($valueToCheck, $arrayToCheck);
    }
public static function doesArrayHaveValue ( array & $ array , $ value , bool $ ignoreCase = false ) : bool { if ( ! is_array ( $ array ) || empty ( $ array ) ) { return false ; } $ valueToCheck = ( $ ignoreCase ) ? strtolower ( $ value ) : $ value ; $ arrayToCheck = ( $ ignoreCase ) ? array_change_key_case ( $ array ) : $ array ; return in_array ( $ valueToCheck , $ arrayToCheck ) ; }
Checks if the given value exists in an array.

@param array $array
The array to check.

@param mixed $value
The value to check for.

@param bool $ignoreCase
[optional]
Whether to treat lowercase and uppercase letters as equivalent during the search.

@return bool Whether value is found in the array.
Checks if the given value exists in an array .