leequalls Posted January 17, 2010 Share Posted January 17, 2010 The following code is giving this error Parse error: syntax error, unexpected T_SL in /home/leequall/public_html/party934/new/onair_now.php on line 58 $djSays = <<<HTML <b><font color="#5fb2d8" size="-1" face="tahoma">What are they saying? <!-- $adjustedTime --></font></b><br> HTML; Link to comment https://forums.phpfreaks.com/topic/188754-unexpected-t_sl/ Share on other sites More sharing options...
Catfish Posted January 17, 2010 Share Posted January 17, 2010 http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc A third way to delimit strings is the heredoc syntax: <<<. After this operator, an identifier is provided, then a newline. The string itself follows, and then the same identifier again to close the quotation. The closing identifier must begin in the first column of the line. Also, the identifier must follow the same naming rules as any other label in PHP: it must contain only alphanumeric characters and underscores, and must start with a non-digit character or underscore. Warning It is very important to note that the line with the closing identifier must contain no other characters, except possibly a semicolon (. That means especially that the identifier may not be indented, and there may not be any spaces or tabs before or after the semicolon. It's also important to realize that the first character before the closing identifier must be a newline as defined by the local operating system. Link to comment https://forums.phpfreaks.com/topic/188754-unexpected-t_sl/#findComment-996416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.