Re: What does "<<<" mean?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, April 30, 2007 7:44 pm, Greg Donald wrote:
> On 4/30/07, Greg Donald <gdonald@xxxxxxxxx> wrote:
>> All parts of a heredoc statement do not have to be right justified,
>> only the closing line.
>
> I meant my other right, the one on my left.  Sorry.

You don't *HAVE* to left-justify the rest either, but, really, the
results are not the same if you don't...

<?php
  //pretend I have LOTS of code here with proper indentation:
                if ($foo){
                   $output1 = <<<EOFOO
This is a test.
This is only a test.
EOFOO;
                   $output2 = <<<EOBAR;
                     This is a test.
                     This is only a test.
                   EOBAR; //I wish!
                 }
?>

Now, if you want to put $output1 and $output2 into an email and dash
it off to somebody, you ain't gonna get quite the same results with
them both...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux