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";
Community
  • 1
  • 1
Melbourne2991
  • 11,707
  • 12
  • 44
  • 82

1 Answers1

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

AD7six
  • 63,116
  • 12
  • 91
  • 123