How to Concatenate Strings in PHP

There is 1 primary method to concatenate strings in PHP. Add a period between each of your strings when assigning the variable that will connect them together. Are you needing to connect multiple strings together into a single unit? The best solution is to connect them together through dot separators as such: $myValue = "string A" . " string B " . " string c "; echo $myValue; // The result will be 'string A string b string c' You will see the above code a good bit in examples but it isn't practical. Why would I not just write it all as one string? It is much more common to find other use cases where you're concatenating strings onto string variables, mixing strings with variables, or need to create a large string from a large array of strings. These situations are a little more complex and in-depth. Concatenate an…