int hasValue(string $name)

$name - the name of the variable to check (or specify a string literal that is the variable's name like 'varname')

Returns 1 if the variable $name has been defined and is not an empty string and is not 0, else the function returns 0.

Example to check the contents of $varname: if hasValue('varname') { ... }

Do not use: if hasValue($varname) { ... } (unless $varname contains the name of the variable to check)

This function is supported by CSS HTML Validator v10.0127 and later.

int hasNoValue(string $name)

$name - the name of the variable to check (or specify a string literal that is the variable's name like 'varname')

Returns 1 if the variable $name has not been defined or is an empty string or is 0, else the function returns 0.

This function is supported by CSS HTML Validator v10.0127 and later.