how to concatenate in php code example
Example 1: php concat
$a = "hello";
$b = "world";
$c = $a . " " . $b;
echo $c;
Example 2: php append string
<?php
$a = "Hello ";
$b = $a . "World!";
$a = "Hello ";
$a .= "World!";
?>
Example 3: php connect strings
$string3 = $string1 . $string2;
Example 4: how to add two string in php
Remember dot .
Example 5: concatenate string php
<?php
$a = 'Hello';
$b = 'World!';
$c = $a.$b;
echo " $c \n";
?>
Example 6: join string php
<?php
$arr = array('Hello','World!','Beautiful','Day!');
echo join(" ",$arr);
?>