PHP Basic Tutorial
String concatenation is used to join two or more strings together into a single string. PHP provides the dot operator (.
) for this purpose.
Try it yourself
An easier and better way is by using the power of double quotes.
By surrounding the two variables in double quotes with a white space between them, the white space will also be present in the result:
Try it yourself