Home › Forums › Back End › Parse error message? › Re: Parse error message?
April 9, 2013 at 11:08 am
#131137
Participant
Another option for HTML strings (especially larger ones) which I prefer is HEREDOC syntax.
$html_string = <<
Using HEREDOC Notation
A “HEREDOC” starts with three less-than brackets,
followed by an identifier of your choosing.
I used [uppercase] “html”, but any text works.
It ends with that same identifier (*all by itself*, on a new line!)
and the closing semicolon.
As you can see, both single- and double-quotes
aren’t a problem inside a HEREDOC.
You can also use $variables
(or even {$arrays})
but not functions() or CONSTANTS.
HTML
;