I am trying to determine if a value is set
not empty
and can include a 0
so...
true | false
----------------
'value' | not set
0 | ''
1 | NULL
2 |
'test' |
if (isset($num) && !empty($num)) {
echo '\'' . $num . '\' THIS ONE';
}
I had assumed that checking isset and !empty would do it but it still fails on the 0
Where am I going wrong?