Say I do this:
$string = 'some string with a {$var}';
// Set var after
$var = 'variable'
// String with just set var
$newString = 'Here is my string: ' . $string;
echo $newString;
How would I make it output:
Here is my string: some string with a variable
I could do it with str_replace(), but I was wondering if there was an easier way?