In PHP, strings are concatenated together as follows:
$foo = \"Hello\"; $foo .= \" World\";
Here, $foo becomes \"Hello World\"
$foo
There's one particular case where you should take care:
user=daniel cat > output.file << EOF "$user"san EOF
Will output "daniel"san, and not danielsan, as you might have wanted. In this case you should do instead:
"daniel"san
danielsan
user=daniel cat > output.file << EOF ${user}san EOF