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

You need to change the last line there.

$mySimpleClass = new SimpleClass();

There's no '$'

> 
> 
> 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 Version 5.0.4, with MAC OS 10.4.4

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to