When I try to do this:
var $example = "Example";
echo <<<EOT
<p>$example</p>
EOT;
I get this error:
Parse error: syntax error, unexpected T_VAR in ..... on line ...
What is going on here?? To my knowledge this should work.
I'm using PHP 5.3.5.
There is no keyword var
in PHP. Not in PHP5 anyway - it's only accepted due to backward compatibility, and is used to define class variables.