How can I distinguish an empty variable from a variable that has the value "0"?
<p>I am a little confused with <code>empty</code> and <code>0</code>. I want to find out if <code>$number</code> is empty. This means for example <code>$number =</code>  But this should not include <code>0</code> because if <code>$number = 0</code> it is not empty for me. </p>

<pre><code>$number = 0;

if(empty($number)){
echo "$number is empty.";
} else {
echo "$number is 0";
}
</code></pre>

<p>My result is <code>$number is empty</code>.</p>