I’ve been getting the dreaded ‘unexpected $end’ message. I tested my setup with the simple test below and still get it. Here is the test code and some caveats. Does anybody know why I might still be getting this message?
<?php
class Skin
{
public static function Test()
{
echo <<<EOF
'hello world'
EOF;
}
}
?>
The only thing I can guess is that your “EOF;” isn’t the first thing on its line. In your code above there are no indents, but I hope that’s just a code-paste thing and it’s indented appropriately. However, make EOF; the very beginning thing on its line.
Couple of notes to make - EOF means End Of File. You can use any word you wish there, so EOF (whilst conventional in tutorials) isn’t a necessary thing to use. Also you don’t need those quotes there either, unless they’re there for a reason.