The Concatenating Assignment Operator, Codecademy's Learn PHP, Concat Assignment Operator in PHP

In this PHP programming guide, we take a look at The Concatenating Assignment Operator, Codecademy’s Learn PHP, Concat Assignment Operator in PHP. In this lesson, we learn a shorthand way of concatenating a value to a variable. We learn that we are able to concat a value to a variable a much faster way through the use of the concatenating assignment operator. The concatenating assignment operator allows us to quickly concat a value to a string variable that we already have. Instead of having to say variable = variable . “other value” we are instead able to write the concatenating assignment operator (.=) and it means the same thing as the longer version. This version would look like this variable .= “other value”. This would allow us to concatenate a new value to our variable. Learning how to use the concatenating assignment operator is important for any aspiring PHP developer. Practice using the concatenating assignment operator in your code to become familiar with how it works. Make sure to understand the concatenating assignment operator before moving on to the next lesson. You may see it arise in your PHP programming journey sometime in the future!