Associate
- Joined
- 15 Apr 2008
- Posts
- 1,031
- Location
- West Didsbury, Manchester
Ok, so I'm trying to use the NowDoc syntax recently introduced in PHP 5.3.0, however I am receiving this error:
The code is available here:
http://pastebin.archlinux.fr/432744
Snippet in question:
Any ideas?
Code:
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_END_HEREDOC or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /srv/http/hiawatha/CCCMS-DEV/blog/index.php on line 72
The code is available here:
http://pastebin.archlinux.fr/432744
Snippet in question:
Code:
<?php
$post = $blogTools->getBlogPost(1);
$string = <<<'EOD'
<div class='blogPost'>
{$post['adminUser']}<br />
{$post['title']}<br />
{$post['body']}<br />
</div>
EOD;
echo($string);
?>
Any ideas?
Last edited: