I am having severe issues with this, and I am hoping that I won't have to write a str_replace function for this.
Essentially I want to import a string from an XML file, and echo the string. The catch: the string contains a valid variable name, and echo does not translate that variable name into the variable value like I want it to.
A string imported from the xml file would look like this:
<a href="$attribs['HREF']" target="$attribs['TARGET']"
Note the
$attribs[' ']
part which is a valid array name in general and within my function.
Also note that this string is contained within an array, so that the echo command would simply be
echo $varname[$index]
Any ideas? I would prefer not to have to use a replace function for sure simplicity. The whole idea is that I'm not going to have any clue what the variable name might be prior to accessing the XML file.
THANKS FOR ANY INPUT!!
Josh