For a complete list of variable functions see http://www.php.net/manual/en/ref.var.php.
PHP provides built-in functions for checking if a variable exists, checking if a variable holds a value, and removing a variable.
To output the results of these functions to a browser, use the var_dump() function (e.g. var_dump(isset($a));).
Function | Explanation | Example |
---|---|---|
isset() |
Checks to see if a variable exists. Returns true or false. | isset($a) |
unset() |
Removes a variable from memory. | unset($a) |
empty() |
Checks to see if a variable contains a non-empty, non-false value. | empty($a)
|