Gratch Posted April 26, 2008 Share Posted April 26, 2008 Hello all, this is my first post so be gentle with me please... I can't seem to find any ino anywhere on using this in php code $content = <<<html ...a bunch of HTML code... html; Could someone explain what the <<<html means? the proper way to use such a thing. I assume it basically means that the variabe will be filled with HTML content. The tripple <<< is what I am not sure of the proper use. Thanks in advance for any help. Link to comment https://forums.phpfreaks.com/topic/103046-question-about/ Share on other sites More sharing options...
DarkWater Posted April 26, 2008 Share Posted April 26, 2008 <<<html html; Has nothing to do with HTML. =) It's just an alternate way of encapsulating a string. It's called heredoc notation I think. It makes it so you don't need to mess with all those quotation marks. =) Link to comment https://forums.phpfreaks.com/topic/103046-question-about/#findComment-527814 Share on other sites More sharing options...
DarkWater Posted April 26, 2008 Share Posted April 26, 2008 Heredoc Link to comment https://forums.phpfreaks.com/topic/103046-question-about/#findComment-527816 Share on other sites More sharing options...
Gratch Posted April 26, 2008 Author Share Posted April 26, 2008 The Heredoc link you provided doesn't work. I thank you for your explanation but I'm still at a loss for info. Can I be directed to learn more about this. I googled the heredoc notation and I am no further to understanding its use, purpose and functionality because I can't find any sites that directly explain what is happening. Link to comment https://forums.phpfreaks.com/topic/103046-question-about/#findComment-527826 Share on other sites More sharing options...
Gratch Posted April 26, 2008 Author Share Posted April 26, 2008 Actually I just found some info... Thanks for pointing me in the right direction and for the fast response. Link to comment https://forums.phpfreaks.com/topic/103046-question-about/#findComment-527828 Share on other sites More sharing options...
DarkWater Posted April 26, 2008 Share Posted April 26, 2008 That link works for me. It should bring you down to the Heredoc section of the PHP manual on strings. Link to comment https://forums.phpfreaks.com/topic/103046-question-about/#findComment-527830 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.