Can't get .php to output to browser

I am completely new to coding, and my current job is just to use the "here document" block. All the code that I have for the program:

<?php
$firstphpstring = <<<ONTOTHENEXTONE 
I have now coded my first block to be displayed
in my very first web page.I am excited to see what the 
next several weeks have in stored.
ONTOTHENEXTONE;

echo $firstphpstring;
?>

But I keep getting the following error:

Analysis error: syntax error, unexpected T_SL in> C: \ wamp \ www \ php_foothill \ Week2Lab_CIS052N_heredoc_gettype.php on line 2

I use Windows 7, WAMPServer 2.2 and have a .php file in a folder in the folder C: \ wamp \ www

+3
source share
1 answer

Delete the space after <<<ONTOTHENEXTONE.

+7
source

All Articles