echo <<<END / heredocs
I have seen "heredocs" used, but for some reason I can't duplicate it! I want to echo a string, obviously, and this string will contain html text. When I run this code, it comes back with:
Parse error: syntax error, unexpected $end in /home/public_html/xxxx.php on line 97
So I'm going to post some code here, and if you have some sort of advice, that'd be great, if not, maybe you could learn what not to do.
function display()
{
echo <<<END
<div>
<p>Here is some example code in an example that is not working.</p>
</div>
END;
}
Thanks, Alex Liebscher