php add variable inside string 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: append variable into string php
echo "'$animal'";
<?php
$name = "Paul";
$age = 26;
echo "My name is {$name}, I'm {$age} years old ";
echo "'$animal'";