Skip to content

Instantly share code, notes, and snippets.

Last active Apr 14, 2021
What would you like to do?
* Define $output on multiple $lines
* Use Herodoc syntax.
* output =
* She said "This is John's test"
* on multiple rows
$who = "John";
$output = <<<TEST
She said "This is $who's test"
on multiple rows
echo nl2br($output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment