jimmyjohns
jimmyjohns

Reputation: 31

Can't get .php to output to the browser

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

<?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:

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

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

Upvotes: 3

Views: 113

Answers (1)

Xenon
Xenon

Reputation: 3185

Remove the space after the <<<ONTOTHENEXTONE.

Upvotes: 7

Related Questions