Re: Heredocs

From: Date: Wed, 29 Aug 2007 12:12:21 +0000
Subject: Re: Heredocs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261448@lists.php.net to get a copy of this message
RodgerW wrote:
Are heredocs supported by PHP 5.2.3 running in WinXP/Apache2.2.4 ? I prrint via heredocs and its not working. Print with single quotes and double quotes work.
        <p>
        <h6>string init method 3: heredocs</h6>
        <?php
            print <<< END
                Test
            END;               ?>
        </p>
It works here on 5.2.3. Try removing ALL whitespace before and after the "END;" portion of your heredocs. If there's whitespace, it doesn't work. -- Aaron Gould

« previous php.general (#261448) next »