change a variable value in another function
<p>I need some help with my php code. This is my code</p>

<pre><code>class myclass extends anotherclass {

    var $bAlert;

    function myclass($var) {
        parent::anotherclass($var);
        $this-&gt;bAlert = false;
    }

function alert() {
        $this-&gt;bAlert = 'true';
        return;
    }

function display() {
        if(!$this-&gt;bAlert) {
           return;
        }
        return 'blah blah';
    }
}
</code></pre>

<p>Now what i want, I have a function to show something on screen when display() is called thats not the problem but i only want it to show up after alert() is called. So here is what i thought but it has a problem. I want to permanently change the value of $bAlert to true once alert() is called and of course it doesn't happen. So, anybody got any other bright ideas or any other way to do it?</p>

<p>Thanks</p>
