Php Isset Function

[Solved] Php Isset Function | Php - Code Explorer | yomemimo.com
Question : php isset

Answered by : claude61340

<?php
$var = '';
// This will evaluate to TRUE so the text will be printed.
if (isset($var)) {
    echo "This var is set so I will print.";
}
// In the next examples we'll use var_dump to output
// the return value of isset().
$a = "test";
$b = "anothertest";
var_dump(isset($a));      // TRUE
var_dump(isset($a, $b)); // TRUE
unset ($a);
var_dump(isset($a));     // FALSE
var_dump(isset($a, $b)); // FALSE
$foo = NULL;
var_dump(isset($foo));   // FALSE
?>

Source : https://www.php.net/manual/en/function.isset.php | Last Update : Tue, 05 Oct 21

Answers related to php isset function

Code Explorer Popular Question For Php