$var1 = "hello";
$var2 = "world";
$concat = $var1.' '.$var2; // $concat ='hello world' (with single quote)
$concat = "$var1 $var2"; // $concat ='hello world' ( with double quote)
<?php
// First String
$a = 'Hello';
// Second String
$b = 'World!';
// Concatenation Of String
$c = $a.$b;
// print Concatenate String
echo " $c
";
?>
<?php
// First String
$a = 'Hello';
// Second String
$b = 'World!';
// Concatenation Of String
$c = $a.$b;
// print Concatenate String
echo " $c
";
?>
$data1="The colour is ";
$data2="red";
$result=$data1.$data2; // The colour is red
$name [] = ['abhi']
this is inside for or foreach loop
# For concatenate use .=
$var .= 'string';
# For adding the VALUES use +=
$var += 1;