Re: [PHP] Basic OOP Question

2006-01-26 Thread Jay Paulson
> Hi, > This is my first post so a cheery hello, this script from php.net: > > > [www.php.net] > > class SimpleClass > { > // member declaration > public $var = 'a default value'; > > // method declaration > public function displayVar() { > echo $this->var; > } > }

Re: [PHP] Basic OOP Question

2006-01-26 Thread Richard Davey
On 26 Jan 2006, at 21:42, Chris Kennon wrote: mySimpleClass = new SimpleClass(); $mySimpleClass ^ ^ ^ Cheers, Rich -- http://www.corephp.co.uk Zend Certified Engineer PHP Development Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

[PHP] Basic OOP Question

2006-01-26 Thread Chris Kennon
Hi, This is my first post so a cheery hello, this script from php.net: [www.php.net] var; } } mySimpleClass = new SimpleClass(); ?> Returned this: Parse error: parse error, unexpected T_STRING, expecting T_FUNCTION in /Users/chris/Sites/php/oop/simple.php on line 4 I'm running PHP