[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: [PHP] Re: Heredocs
From: 69.255.41.127
Date: 2007-08-29 23:51:34
Message-ID: A3.0B.08934.63606D64 () pb1 ! pair ! com
[Download RAW message or body]
Suggestion....
Write your code like this and you'll be less likely to err and your code will be
more readable. You can even put variables inside the heredoc.
<?php
$str= <<<txt
<p>
<h6>string init method 3: heredocs</h6>
Your test text
</p>
txt;
print $str;
?>
RodgerW wrote:
> Are heredocs supported by PP 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>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic