php - ( ! ) Parse error: syntax error, unexpected '<<' (T_SL) on line 6 -
( ! ) parse error: syntax error, unexpected '<<' (t_sl) on line 6
the error line 6 display block have removed spaces , closed it. code still wont run when removed ; whole code goes yellow. have code has same error , tried removing the(<<) nothing closed still same thing. time reads past when remove ;. whole code after line turns yellow
<?php include 'ch19_include.php'; if (!$_post) { //haven't seen form, display $display_block = <<<end_of_block; <form method="post" action="$_server[php_self]">; <p><label for="subject">subject:</label><br/> <input type="text" id="subject" name="subject" size="40" /></p> <p><label for="message">mail body:</label><br/> <textarea id="message" name="message" cols="50" rows="10"> </textarea></p> <button type="submit" name="submit" value="submit">submit</button> </form> end_of_block;
$display_block = <<<end_of_block (your text) end_of_block;
remove semicolon after first end_of_block. "code turning yellow" editor telling knows piece of code heredoc-string. nothing worry about.
Comments
Post a Comment