In JavaScript, you can do this:
console.log(`Hello ${3 + 4} World.`)
The out put will be Hello 7 World
. I can do the same in C# with Console.WriteLine($"Hello {3 + 4} World")
.
In PHP I tried:
echo "Hello {3 + 4} World."
However the output of this is Hello {3 + 4} World
.
How do I interpolate expressions in strings in PHP?