PHP function is not working
<p>I'm just trying to write a function that can switch background color.</p>

<p>Each time it's run, it should return the other color, but it's not working</p>

<pre><code>function bgcolour_switch(){
    if(!isset($p)){
        global $p;
        $p = "#C0C0C0";
        return $p;
    }else{
        if($p == "#C0C0C0"){
            $p = "#FFFFFF";
            return $p;
        }elseif($p == "#FFFFFF"){
            $p = "#C0C0C0";
            return $p;
        }
    }
}
</code></pre>

<p>I keep getting the same color returned (#C0C0C0)</p>
