Is there a way to dynamically change a variable value inside a string?
What i have tryed :
$World= "World";
$world = &$World;
$tmp = "Hello ".$world." ====";
$World= "Tada!";
echo $tmp;
What it echoed : Hello World ====
what i want it to echo : Hello Tada! ====
No.
There is no more “variable inside of a string” after this line got executed, but just a regular string.
you may use some placeholder instead of interpolating a variable