Show Output
Example of Testing Whether a Variable is Set in PHP
"; $var2 = 'Hello World!'; if(isset($var2)){ echo 'This line is printed, because the $var2 is set.'; } echo "
"; // Unset the variable unset($var2); if(isset($var2)){ echo 'This line is printed, because the $var2 is set.'; } else{ echo 'This line is printed, because the $var2 is not set.'; } echo "
"; $var3 = NULL; if(isset($var3)){ echo 'This line is printed, because the $var3 is set.'; } else{ echo 'This line is printed, because the $var3 is not set.'; } ?>