concat varaible php code example
Example 1: php concat variable and string
<?php
$name = "Paul";
$age = 26;
echo "My name is {$name}, I'm {$age} years old ";
Example 2: php concatenate two variables
$string = "the color is ";
$string .= "red";
echo $string; // gives: the color is red