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?
Asked
Active
Viewed 4.0k times
0

ThiefMaster
- 310,957
- 84
- 592
- 636

Jess McKenzie
- 8,345
- 27
- 100
- 170
3 Answers
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
- 310,957
- 84
- 592
- 636
2
You're missing a dot.
$this->email->subject($this->core_model->companyDetails()->coreCompanyName.'User Registration Confirmation');

Martin.
- 10,494
- 3
- 42
- 68
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
- 310,957
- 84
- 592
- 636

wonderb0lt
- 2,035
- 1
- 23
- 37
-
no, he's just missing a comma, not a dot – Martin. Feb 19 '12 at 20:32
-
The subject method doesn't seem to have two parameters... see [here](http://codeigniter.com/user_guide/libraries/email.html) – wonderb0lt Feb 19 '12 at 20:35