Trying to use some data from a preg_replace as an array index.
Problem is, it isn't working.
Here's what I got so far...
$this->localestring is an array something like this:
$this->localestring['msg'] = "Welcome!"
$this->localestring['ms2'] = "Goodbye"
Now, using this code I'm trying to replace "{STRING: msg}" with "Welcome!", "{STRING: ms2}" with "Goodbye", and so on:
$this->text = preg_replace("/{\STRING: (.*)}/", $this->locale_string['$1'], $this->text);
Not working, though.
Any thoughts? Thank you,
-Kevin