Parse Error Syntax Error Unexpected T Sl In C
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta
Syntax Error, Unexpected T_sl Heredoc
Discuss the workings and policies of this site About Us Learn parse error syntax error unexpected t_sl php more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us php eot Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like
Parse Error: Syntax Error, Unexpected End Of File In
you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected '<<' (T_SL) [closed] up vote 0 down vote favorite I have this code, but I'm getting Parse error: syntax error, unexpected '<<' (T_SL)
Heredoc Php
id=$id"); echo <<<_END;
?> the error is on line 7 which is echo <<<_END; . I already tried echo<here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected T_SL up vote -2 down vote favorite I am recieveing a syntax error, unexpected http://stackoverflow.com/questions/20931450/parse-error-syntax-error-unexpected-t-sl T_SL at the EOD. From what i have been reading it's normally from extra spaces/tabs/white space. In this case there are none. I have even hard coded the email and was still receiving the error. I have tried placing the end of the EOD on another line with no spaces and still doesn't work. Any other ideas? $emailSubject = 'crazy php scripting!'; $webMaster = 'someEmail@yahoo.com'; $email = 'someEmail@live.com'; /* This is the http://stackoverflow.com/questions/17748582/parse-error-syntax-error-unexpected-t-sl line i get errors from. */ $body = <<
Email:{$email}
EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); php email email-integration share|improve this question asked Jul 19 '13 at 14:27 Sari Rahal 840524 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted change this line $body = <<
Email:{$email}
EOD; to: $body = <<
Email:{$email}
EOD; Because heredocs symbol should be at beginning of the new line share|improve this answer answered Jul 19 '13 at 14:28 user1646111 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged php email email-integration or ask your own question. asked 3 years ago viewed 1775 times active 3 years ago Related 1How to accurately parse smtp message status code (DSN)?20Parse error: syntax error, unexpected T_SL on line 237Syntax error, unexpected T_SL-4PHP Email Error2Parse error: syntax error, unexpected T_SL PHP heredoc-3Parse error: syntax error, unexpected '{'0Parse error: syntax error, unexpected '<<' (T_SL)-1Parse error: syntax error,
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and http://stackoverflow.com/questions/39075564/parse-error-syntax-error-unexpected-t-sl-in-c-xampp-htdocs-kensift-ind policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only syntax error takes a minute: Sign up Parse error: syntax error, unexpected '<<' (T_SL) in C:\xampp\htdocs\kensift\index.php on line 167 [duplicate] up vote -3 down vote favorite This question already has an answer here: Reference - What does this error mean in PHP? 29 answers PHP Parse/Syntax Errors; and How to solve them? 10 answers Well I'm endeavoring to combine an html signup form parse error syntax and its php response script into a single program in one file. please check code below: Problem is, every time I try to run this program the Parse error syntax error, unexpected '<<' (T_SL) shows up! What could be the possible problem? help will be greatly appreciated..