PHP variable scope and IFs
<p>I have roughtly something similar to this: </p>

<pre><code>function get_gender ($gid){ 
    $return= '';

...some code ..

    if ($male !== 0 &amp;&amp; $female !== 0){
        $return = 'mixed';
    }else if ($male !== 0 &amp;&amp; $female == 0){
        $return = 'male';
    }
    return $return;

}
</code></pre>

<p>I know for a fact that one of the condition is met, so i assumed the $return variable would be updated. Though it always comes back empty. Is this a problem of scope ?</p>
