going crazy

I’m using php classes for the first time on my site, and I must be doing something wrong, but I have no idea. this is my code.

[php]

<?php class PasswordUnconfirmed extends Exception {} class InvalidUser extends Exception {} class UserExists extends Exception {} class User { public function displayVar() { echo "print something"; } public function something() { return; } } ?>

[/php]

for some reason i’m getting a :

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ on line 10(which is the line that my first public function is declared on. I pretty much copied this code directly from a tutorial in order to make it do something and I get nothing. Any ideas?

Sponsor our Newsletter | Privacy Policy | Terms of Service