Tuesday, July 31, 2018

syntax - What is the use of



I am implementing node to PDF using drupal and tcpdf. In such case i am suppose to use this << tag. If i didn't give this o/p is not perfect. I can't exactly get the purpose of <<.



Could anybody please explain the concept of this?




$html = <<        
TEST

EOD;


Thanks in advance....


Answer




That is not HTML, but PHP. It is called the HEREDOC string method, and is an alternative to using quotes for writing multiline strings.



The HTML in your example will be:



    
TEST



Read the PHP documentation that explains it.



No comments:

Post a Comment

plot explanation - Why did Peaches&#39; mom hang on the tree? - Movies &amp; TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...