Checking if a Variable is Set in PHP


Use isset() to determine if a variable is declared and is different than NULL.

Source Code

$var = '';
if (isset($var)) {
    echo "This variable is set.";
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments