DEV Community

Discussion on: PHP For JavaScript Developers

Collapse
 
dabretema profile image
Daniel Brétema

Friendly reminder for a syntax shockingly difference between PHP and any other language. The dot ( . ) is the concatenation operator!

$hello = "hello";
$hello .= " world!";
echo $hello; // out: hello world!

For more info, check this out: positronx.io/php-concatenate-strin...

Collapse
 
smoldev profile image
Megan Miller

I knew I was forgetting something, thank you!