Presto Presto - 1 year ago 162
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download