$a = "hello"; $b = "world"; $c = $a . " " . $b; echo $c; // hello world
var str1 = "Hello "; var str2 = "world!"; var res = str1.concat(str2); // does not change the existing strings, but // returns a new string containing the text // of the joined strings.
<?php $a = "Hello "; $b = $a . "World!"; // now $b contains "Hello World!" $a = "Hello "; $a .= "World!"; // now $a contains "Hello World!" ?>
<?php // First String $a = 'Hello'; // Second String $b = 'World!'; // Concatenation Of String $c = $a.$b; // print Concatenate String echo " $c \n"; ?>