I have a piece of PHP code (in a Magento installation) which produces a list of URLs, I need to put a variable with each of these, for example the first URL could be assigned to $curGBP, the second to $curEUR,and so on... I've managed to produce what the variable name needs to be so it's just putting the final part of the jigsaw together.
I currently have this code:
<?php foreach ($this->getCurrencies() as $_code => $_name): ?>
<?php echo $this->getSwitchCurrencyUrl($_code) ?>
<?php echo "\$cur"?><?php echo $_code ?><br />
<?php endforeach; ?>
Which produces this output:
../GBP/uenc/SESSIONID/ $curGBP
../EUR/uenc/SESSIONID/ $curEUR
../USD/uenc/SESSIONID/ $curUSD
../AED/uenc/SESSIONID/ $curAED
What do I need to add to the foreach section to assign the URL to a variable?
Note: SESSIONID is a long string which I've replaced in this example for neatness.