<?php
$information = <<<INFO
Name: John Smith
Address: 123 Main St
City: Springville, CA
INFO;
echo $information;
?>
Result:
Parse error: syntax error, unexpected T_SL on line 3
<?php
$information = <<<INFO
Name: John Smith
Address: 123 Main St
City: Springville, CA
INFO;
echo $information;
?>
Result:
Parse error: syntax error, unexpected T_SL on line 3
Try the following:
<?php
$information = <<<EOS
Hello world!
EOS;
echo $information;
?>
The parser is complaining because you have whitespace after the angled brackets declaring a heredoc. You need to make sure you're actually following the heredoc syntax, which you can find on the PHP Manual site (specifically: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc).
<?php
$information = <<<ENDHEREDOC
this is my text
ENDHEREDOC;
echo $information;
I've just edited your question and fixed invalid formatting (SO is using Markdown). I found out that there is a space character after <<<INFO
- that causes the error.
Delete that space and everything should work fine... well - it has to works fine.