Skip to content

isset ​

php
bool isset ( mixed $zmienna )

Checks whether a variable has been created. Returns true if it exists, or false if it does not. A variable with the value NULL is an exception: isset returns false.

Example:

php
$check = null;

if (isset($check) == true) {
print('true');
} elseif (isset($check) == false) {
print('false');
}

Result:

false