how to concatenate variable in php code example
Example 1: php concatenate and add
this is inside for or foreach loop
# For concatenate use .=
$var .= 'string';
# For adding the VALUES use +=
$var += 1;
Example 2: php concatenate two variables
$string = "the color is ";
$string .= "red";
echo $string; // gives: the color is red