What is ".=" used for in PHP and when should I use it? [duplicate]

0

I'm not sure what to do, but I do not know how to do it.

    

asked by anonymous 26.12.2017 / 16:46

1 answer

2

String Concatenation

Same as:

$main = $main . '...';

Ex:

$main = 'teste';
$main .= '1';
$main .= '2';
$main .= '3';

echo $main; //irá imprimir 'teste123'
    
26.12.2017 / 16:48