This question already has an answer here:
This code:
<?
echo <<<EOM
Hello
EOM;
?>
Results in this error:
Parse error: parse error in C:\xampp\htdocs\tiketku\cari.php on line 2
What am I doing wrong?
</div>
This question already has an answer here:
This code:
<?
echo <<<EOM
Hello
EOM;
?>
Results in this error:
Parse error: parse error in C:\xampp\htdocs\tiketku\cari.php on line 2
What am I doing wrong?
</div>
You have a space after <<<EOM
. This is illegal. Remove the space and it will work fine.
From the manual:
A third way to delimit strings is the heredoc syntax:
<<<
. After this operator, an identifier is provided, then a newline.
You can't have whitespace between the identifier and the new line.