Parse Error Syntax Error Unexpected T_sl In
Contents |
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 syntax error, unexpected t_sl heredoc this site About Us Learn more about Stack Overflow the company Business
Php Eot
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask parse error: syntax error, unexpected end of file in 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 heredoc php 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)
while($row = mysqli_fetch_array($result)) { echo "ID:
"; echo "Lastname:
"; echo "Codename:
"; echo "Location:
"; echo "Rank:
"; }
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 http://stackoverflow.com/questions/20931450/parse-error-syntax-error-unexpected-t-sl error, unexpected T_SL up vote -2 down vote favorite I am recieveing a syntax error, unexpected 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 http://stackoverflow.com/questions/17748582/parse-error-syntax-error-unexpected-t-sl 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 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 ac
If this is your first visit, be sure to http://board.phpbuilder.com/showthread.php?10333424-RESOLVED-Parse-error-syntax-error-unexpected-T_SL check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to syntax error 9 of 9 Thread: [RESOLVED] Parse error: syntax error, unexpected T_SL Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 12-12-2006,12:02 PM #1 vigar_neil View syntax error, unexpected Profile View Forum Posts Junior Member Join Date Nov 2006 Posts 12 [RESOLVED] Parse error: syntax error, unexpected T_SL Hi, I am trying to create an image gallery for my site. I am using the following code, but when I try to load the page I get the following error: Parse error: syntax error, unexpected T_SL in /home/users/uks53122/html/sportsmatesreunited.co.uk/photos/preupload.php on line 15 Can anybody tell me why I am getting this message and how I fix the problem? Any help would be very much appriciated. PHP Code: include'config.inc.php';
//initialization
$photo_upload_fields='';
$counter=1;
//Ifwewantmorefields,thenuse,preupload.php?numb