Syntax error unexpected T

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?


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');

你错过了一个点。

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

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');
链接地址: http://www.djcxy.com/p/11972.html

上一篇: PHP中关联数组的插值(双引号字符串)

下一篇: 语法错误意外T