php 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';
}
is_null($foo)
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';
}