+ 2
What is the difference between these in php
One has dot and the other doesn't. I have seen this several times but i have not been able to figure out the role of the dot(.) Before the equal sign
2 Answers
+ 5
It's a concatenation assignment operator for strings.
$txt1 = "Hello, "
$txt2 = "World!"
$txt1 .= $txt2
echo $txt1 // "Hello, World!"
https://www.w3schools.com/php/php_operators.asp
+ 2
Thanks bro