Greetings,
Say I got the following:
A hash ($list) with the keys named keyA, keyB, ...
and values associated to them (valueA, valueB).
Furthermore a template with placeholders like {keyA}
.... {keyB} ...
(So the placeholders have the same names as the keys of the hash.)
What I want now, is that the values from the hash are parsed into the
corresponding placeholders.
Say: {keyA} becomes valueA (which is $list['keyA']).
For that purpose I've already done this regular expression:
$Output = preg_replace("=\{(.*)\}=U", $list["$1"], $template);
PROBLEM: There are no values parsed!
Now, what's my mistake and who can help?!
Lots of thanks,
regards Florian Behaim