Re: heredoc problem

From: Date: Mon, 03 Mar 2003 02:26:22 +0000
Subject: Re: heredoc problem
Groups: php.general 
Request: Send a blank email to php-general+get-137828@lists.php.net to get a copy of this message
In a message dated 3/2/2003 3:55:50 PM Pacific Standard Time, martin.towell@world.net writes: >when I copy/pasted directly from your email and tried to execute it, I can >an error on line 5 too > >I noticed that there's a space at the end of line 5, I deleted it and it >worked fine. > That's it. That is the problem. Good eye. Thank you, Janet >> -----Original Message----- >> From: janet@valade.com [mailto:janet@valade.com] >> Sent: Monday, March 03, 2003 9:02 AM >> To: php-general@lists.php.net >> Subject: [PHP] heredoc problem >> >> >> Can someone tell me what is wrong with the following code: >> >> >> <head><title>Testing</title></head> >> >> <?php >> $str = <<<EOD >> Example of string >> spanning multiple lines >> using heredoc syntax. >> EOD; >> ?> >> >> >> >> This is code straight out of the PHP manual. I get the error: >> Parse error: parse error, unexpected T_SL in testhere.php on line 5 >> >> I looked up T_SL and it is a token representing << so that >> means it just >> doesn't get the <<<. Why not? I've tried all the combinations >> of spaces and >> no space in that line that I can think of. >> >> So, what's wrong. Undoubtedly something obvious to anyone except me. >> >> Janet >> >> -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#137828) next »