Presto Presto - 1 month ago 6x
PHP Question

What does the .= operator mean in PHP?

I have a variable that is being defined as

$var .= "value";

How does the use of the dot equal function?


It's the concatenating assignment operator. It works similarly to:

$var = $var . "value";

$x .= differs from $x = $x . in that the former is in-place, but the latter re-assigns $x.