how to check if a variable is set or defined in php code example Example: php see if undefined if (isset($variable)) { /* do something */ };