Hello everybody.. I've read about the "heredoc" way of outputting strings..
Where can we consider this use handy??
Is it used only to avoid escaping the single and double quotation mark??
Also, why is there an identifier to be put at the first and end of the function??
Thanks beforehand.
Pro2000 29 Posting Whiz
Recommended Answers
Jump to PostIt leaves the choice to the coder, because you might want to use E; in your output. By leaving this choice to you, you can make sure it is something that is not used in your output.
Jump to PostSuppose PHP required it to be E;
$MyVariable = <<< E I want to output E; on the start of the following line: E; E;
This would fail of course. Since you can choose what you want, you can change it to:
$MyVariable = …
All 6 Replies
broj1 356 Humble servant Featured Poster
Pro2000 29 Posting Whiz
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
Pro2000 29 Posting Whiz
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
Pro2000 29 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.