Hi,
I'm wondering if anyone of you guys knows whether it's possible to do this:
$s = 'Variable: $v1, should be replaced. $v2';
$v1 = 'some dipshit value';
$v2 = 'cheerio';
$parsed = some_function_or_whatever($s);
print $parsed;
Then the output should be --
Variable: some dipshit value, should be replaced. cheerio
My problem here is that the variables should be defined AFTER the string is defined. So first $s and then $v1 & $v2.
I've juggled a lot with syntaxes and I've tried to find a built-in function but no solutions yet.
Many thanks in advance,
Tim.