0

I am getting the following error syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on this line $this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation'); have I make a mistake with the '' and ""? I have also past the name as $data can I include this in the subject instead of the model call?

ThiefMaster
  • 298,938
  • 77
  • 579
  • 623
Jess McKenzie
  • 8,266
  • 27
  • 96
  • 164

3 Answers3

13

You probably forgot a comma: Try this:

$this->email->subject($this->core_model->companyDetails()->coreCompanyName, 'User Registration Confirmation');

instead of

$this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation');
ThiefMaster
  • 298,938
  • 77
  • 579
  • 623
2

You're missing a dot.

$this->email->subject($this->core_model->companyDetails()->coreCompanyName.'User Registration Confirmation');
Martin.
  • 10,271
  • 3
  • 40
  • 67
0

Did you miss to concatenate the two strings (coreCompanyName and "User Registration Confirmation)? Write a "." between the two. See also here.

The code should look like:

$this->email->subject($this->core_model->companyDetails()->coreCompanyName . ' User Registration Confirmation');
ThiefMaster
  • 298,938
  • 77
  • 579
  • 623
wonderb0lt
  • 1,987
  • 1
  • 22
  • 34