Forum Moderators: coopster

Message Too Old, No Replies

What does <<< do?

I see <<< in a lot of scripts....what does it do?

         

amnesia440

8:07 pm on Jun 5, 2008 (gmt 0)

10+ Year Member



Hello -

I was wondering what <<< does

For example:


<<<ENDPRINT
(...code (usually a bunch of it)...)
ENDPRINT;

I *did* do some searching for it online and read that it's used when there is a block of code that you want the php parser to ignore. I understand that, but I also see variables inside the <<< blocks.

Can you have variables in the <<< (wish I knew the exact term)

Thanks

cameraman

8:32 pm on Jun 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's called heredoc [us3.php.net] syntax. It's a convenient way of assigning a large amount of text to a variable, and yes, you can use other variables in it.

amnesia440

8:34 pm on Jun 5, 2008 (gmt 0)

10+ Year Member



Thank you cameraman, I will read up on it!