I am checking a variable using the following code to
if(!empty($var) && $var == 1)
{
// do some thing
}
elseif(!empty($var) && $var == 0)
{
// do some thing
}
But the elseif is not working
If I removed the !empty then its working fine.
what is the problem on that
Can any one explain these and also differences between isset and !empty
Please peruse the documentation on what PHP considers to be
empty.I’d rewrite your code as: