Just trying to remember how I can stream to a string.
I seem to recall it looking something like ...
Code: Select all
$value = <<STUFF
blah
blah
blah
STUFF>>Cheers
Moderator: General Moderators
Code: Select all
$value = <<STUFF
blah
blah
blah
STUFF>>Code: Select all
$somevar = <<<ANYWORD
Content goes here with variables escaped in
{$curly_brackets} like so but usually you don't need the
curly brackets.
The whole string gets parsed like a double quoted string across
multiple lines without the need to escape quotes.
ANYWORD;
//Or
echo <<<SOMETHING
Put the content here
however you want!
SOMETHING;
//