Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #634
    dan
    Participant

    Run to error with “syntax error, unexpected $EOF, expecting T_STRING or T_NUM_STRING”

    <?php

    $name = “John”;
    $age = 25;

    $message = <<<HTML
    Hello $name,

    We heard you just turned $age! Congratulations!

    Best wishes,
    Your Friends
    HTML;

    echo $message;
    ?>

    • This topic was modified 3 months, 3 weeks ago by dan.
    #636

    With heredoc, this error normally happens when you indent the closing HTML. Make sure its not indented.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.