I was going through a tutorial on classes (at www.phpbuilder.com/columns/rod/19990601.php3?page=2) and copied the code exactly. This part of the code ($Basic->Set('size','2'); is giving me the error message
" Call to undefined function: set() in /home/priority/public_html/auth/classesdemo.php on line 44"
34 $Basic = new Style;
36 Function Set($varname,$value) {
38 $this->$varname=$value;
40 }
42
44 $Basic->Set('size','2');
If I comment out line 44 I get the same error at line 48
47 $Theader= new Style;
48 $Theader->Set('text','#0000FF');
49 $Theader->Set('bgcol','#000000');
Obviously whatever I did to the function at line 36-40 isn't enough but I don't understand why it won't work. Could someone help me with this?