0

Possible Duplicate:
Parse error: syntax error, unexpected ‘(’, expecting ‘,’ or ‘;’ in

I'm getting the following error:

Parse error: syntax error, unexpected '.', expecting ',' or ';' in xxx on line 19

On this line:

public $metad_name = "lol" . "lol"; 
1
  • 2
    Not sure about the downvotes. It's a dupe almost for sure, but not a bad question per-se. Commented Oct 23, 2012 at 15:19

1 Answer 1

9

This error is saying that an expression can't be used in class properties:

Works

class Foo { public $metad_name = ''; function __construct() { $this->metad_name = 'lol' . 'lol'; } } 

Parse error

class Bar { public $metad_name = 'lol' . 'lol'; } 

If your code isn't a class property - just delete the public

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.