At the moment i am learning PHP and came across the heredoc syntaxis. I have read the php.net documentation but still couldn't fix the bug. I also tried the pre tags since it was adviced in another stackoverflow post, but that didn't fix it either.
I have a problem with ending the heredoc, i can't. It makes everything after it a comment. Could someone please help me out? Thanks in advance!
The code:
<?php
        $naam = "Carl";
        $adres = " Kruislaan 111";
        $woonplaats = " Utrecht";
        $naw = $naam . $adres . $woonplaats;
        //Resultaat "Carl Kruislaan 111 Utrecht"
        echo ("Gegevens: $naw");
        echo <<<EIND
        <pre>
        Salaris specificatie <br />maand: november jaar:2010
        plaats: $woonplaats <br/>
        Algemene gegevens:
        </pre>
        EIND;
    ?>
It gave me this error: Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\Webdesign\unit4\voorbeeld.php on line 25
It pointed to the closing html tag since it's still a comment:
See whole code if needed:
<!DOCTYPE html>
<html lang="nl">
<head>
    <title>Mijn php-script</title>
</head>
<body>
    <h3>Variabelen</h3>
    <?php
        $naam = "Carl";
        $adres = " Kruislaan 111";
        $woonplaats = " Utrecht";
        $naw = $naam . $adres . $woonplaats;
        //Resultaat "Carl Kruislaan 111 Utrecht"
        echo ("Gegevens: $naw");
        echo <<<EIND
        <pre>
        Salaris specificatie <br />maand: november jaar:2010
        plaats: $woonplaats <br/>
        Algemene gegevens:
        </pre>
        EIND;
    ?>
</body>
</html>
 
    