Results 1 to 4 of 4
Thread: trying to understand heredoc
Oct 2, 2013, 14:16 #1
- Join Date
- Aug 2010
- 2 Post(s)
- 0 Thread(s)
trying to understand heredoc
I read that heredoc is for long strings of text specifically multi lines. So are we talking quantity of text or formatting?
One example I read is that someone used to use heredoc for writing out sql strings in php, so they could read the query easier.
But I write queries all the time on multiple lines without a problem, without any form of concatenating:
$sql = "SELECT
I just don't understand if heredoc is for, say, a paragraph of text, or multiple lines ( formatting wise ), that need to echo out on the page in multiple lines.