I've seen these characters used together in Wordpress PHP, but I'm not sure what they do. An example:
$content .= '' . $title . '';
I've seen these characters used together in Wordpress PHP, but I'm not sure what they do. An example:
$content .= '' . $title . '';
That is the short hand version of a concatenation where you say append something to the end of this string itself. It means
$content = $content. $title;
Thats a php string concatenation operation. For example
$str1 = "Hello";
$str2 = "World";
$str1 .= " " . $str2; // is equal to writing $str1 = $str1 . " " . $str2;
echo $str1 // will print Hello World
It is a concatenation assignment operator
$x="Hello";
$x .= " world!";
echo $x; // outputs Hello world!
$a .= $b
means $a = $a . $b
This also apply to some other operations such as +, -, *, /, ... For example:
$a += $b => $a = $a + $b
$a -= $b => $a = $a - $b
$a *= $b => $a = $a * $b
$a /= $b => $a = $a / $b