Q:

String and variable concatenation in php

I am new to PHP and I want to concatenate a string with a variable without any space. I am using a variable $var and a string which is given below.  
$var   // This is variable
"Name\branch" //This is String

I want to concatenate the string and the variable without any space. I am using code like this:  
$var2 = "Name\Branch\ $var" 

But a space is created between them.

A:

Space is there, because you entered it ;)
Use examples:
$var2 = "Name\Branch\\$var";
$var2 = "Name\Branch\\" . $var;
$var2 = 'Name\Branch\\' . $var;
$var2 = "Name\Branch\\{$var}";
$var2 = trim("Name\Branch\ ") . $var;

