Php Parse Error Syntax Error Unexpected T_sl
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the syntax error, unexpected t_sl heredoc workings and policies of this site About Us Learn more about Stack php eot Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Parse Error: Syntax Error, Unexpected End Of File In
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
Heredoc Php
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)
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 http://stackoverflow.com/questions/20931450/parse-error-syntax-error-unexpected-t-sl 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 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 http://stackoverflow.com/questions/17748582/parse-error-syntax-error-unexpected-t-sl 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 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
If this is your first visit, be sure to check http://board.phpbuilder.com/showthread.php?10333424-RESOLVED-Parse-error-syntax-error-unexpected-T_SL out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to http://www.mintjoomla.com/support/community-forum/user-item/2583-hwdevteam/48-cobalt-8/3232-parse-error-syntax-error-unexpected-t_sl-expecting-t_function-in-home-sitename-public_html-administrator-components-com_cobalt-controllers-records-php-on-line-34.h proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 9 of 9 syntax error 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 Profile View Forum Posts syntax error, unexpected 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: not found on this server. Apache/2.2.15 (CentOS) Server at www.mintjoomla.com Port 80 include'config.inc.php';
//initialization
$photo_upload_fields='';
$counter=1;
//Ifwewantmorefields,thenuse,preupload.php?number_of_fields=20
$number_of_fields=(isset($_GET