Top "Heredoc" questions

A Here-document is a special syntax of writing literal strings in sourcecode, used by different programming languages.

Heredoc not working

<?php $information = <<<INFO Name: John Smith Address: 123 Main St City: Springville, CA INFO; echo $information; ?> …

php heredoc
Is there heredoc alternative in Java (heredoc as PHP)?

For JAVA development I need writing to a files with strings like "\r\t\n <>", because from Java …

java php readfile heredoc
JavaScript HERE-doc or other large-quoting mechanism?

Is there a convenient way to quote a large block of HTML that has both single and double quotes in …

javascript quotes heredoc
Can I read line from a heredoc in bash?

Here's what I'm trying. What I want is the last echo to say "one two three four test1..." as it …

bash heredoc
Formatting an array value inside a Heredoc

I was wondering why I can't do something like {number_format($row['my_number'])} inside a Heredoc. Is there any …

php arrays heredoc
conditional statements inside php heredocs syntax?

i was wondering if you can have conditional statments inside a heredocs, this is my script but it deosnt parse …

php conditional heredoc
Why do these Heredoc and Nowdoc cause errors?

I've already found some solutions, but can't know what happened... Example 1: <?php echo <<< EOD test EOD; …

php heredoc nowdoc
\n in variable in heredoc

Is there any way to for a Bash heredoc to interpret '\n\' in a heredoc? I have an …

bash variables escaping heredoc
Working with long strings (heredocs) in Java - the readable approach?

I need to work with long strings containing line breaks in Java. Those are for HTML generation, but it is …

java string heredoc
Working with large text snippets in Java source

Are there any good ways to work with blocks of text (Strings) within Java source code? Many other languages have …

java text heredoc