Tuesday 29 May 2018

php - Syntax error unexpected T_CONSTANT_ENCAPSED_STRING




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?


Answer



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

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...