What does the .= operator mean in PHP?

前端 未结 4 1933
逝去的感伤
逝去的感伤 2021-01-01 08:57

I have a variable that is being defined as

$var .= \"value\";

How does the use of the dot equal function?

4条回答
  •  醉酒成梦
    2021-01-01 09:35

    This is for concatenation

    $var  = "test";
    $var .= "value";
    
    echo $var; // this will give you testvalue
    

提交回复
热议问题