Problems determing if value is a number
<p>I am doing this check on a variable:</p>

<pre><code>if (empty($num) || !isset ($num) || !is_numeric ($num))
{
    $population = -1;
}
else
{
    $population = $num;
}
</code></pre>

<p>And what I was hoping for is that if num is null or not a number or doesn't exist, to make $population = -1 and in all other cases to give $population the value of $num</p>

<p>But that is not happening for me.  Any ideas why this isn't working the way I thought it would?</p>
