I need to find the text {[lang_whatever]} in my string, and then use the "whatever" (it can be anything) text later in another function. How can I do that?
In case that doesn't make sense, here's an example:
I have the HTML markup for an image stored in the database, and it looks like this:
<img alt="{[$lang_delete]}" src="delete.jpg" title="{[$lang_delete_title]}" />
(I insist on using {[$string]} becuase I want to match the way the language variables are called in my templates...)
I need to search the string (in this case the <img /> code) for each instance of {[$lang_whatever]} and then assign the "whatever" part as a variable that can be used later in an str_replace() as I have an array that will match the "whatever" with the keys in an array, and replace it with that particular key's value.
