php call to undefined function (beginner on classes)
<p>I have 2 files index.php and class_lib.php.</p>

<p>Here is index.php</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
 &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" /&gt;
    &lt;title&gt;OOP in PHP&lt;/title&gt;
    &lt;?php include("class_lib.php"); ?&gt;
&lt;/head&gt;
&lt;body&gt;
        &lt;?php
            $adrian = new person();
            $jimmy = new person;

            $adrian = set_name('adrian de cleir');
            $jimmy = set_name('jimmy darmady');

            echo $adrian-&gt;get_name();

    ?&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and the file with the class</p>

<pre><code>&lt;?php
    class person {

    var $name;
           function set_name($new_name) {
                      $this-&gt;name = $new_name;
                   }
           function get_name() {
                      return $this-&gt;name;
                    }



    }
?&gt;
</code></pre>

<p>When I load the page I get 
Fatal error: Call to undefined function set_name() in /var/www/php_learning_testing/index.php on line 15</p>

<p>Thanks for the help, its something silly im sure.</p>
