php check if null or empty code example
Example 1: php check for null
is_null($foo)
Example 2: php check for empty string
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';
}
Example 3: php check empty variable
empty var php