In PHP, strings are concatenated together as follows:
$foo = \"Hello\";
$foo .= \" World\";
Here, $foo
becomes \"Hello World\"
The way I'd solve the problem is just
$a$b
For example,
a="Hello"
b=" World"
c=$a$b
echo "$c"
which produces
Hello World
If you try to concatenate a string with another string, for example,
a="Hello"
c="$a World"
then echo "$c"
will produce
Hello World
with an extra space.
$aWorld
doesn't work, as you may imagine, but
${a}World
produces
HelloWorld