PHP - accessing class variables
<p>I'm pretty new to PHP - wondering why the following causes an error. doSomething() gets called from another PHP file.</p>

<pre><code>    class MyClass
    {   
        private $word;

        public function __construct()
        {
            $this-&gt;word='snuffy';
        }


        public function doSomething($email)
        {
            echo('word:');
            echo($this-&gt;word); //ERROR: Using $this when not in object context
        }
    }
</code></pre>
