Embed variable in hereDoc and string in PHP
Description
The following code shows how to embed variable in hereDoc and string.
Example
<?php//from w w w . j av a 2 s.c om
$name = "Jack";
//Greet Zeev
print("Hello, $name!\n");
//Greet Zeev again
print <<< EOD
Hello again, $name!
How is it going?
EOD;
?>
The code above generates the following result.