Hmmmm, not entirly sure how to explain this but, I'll have a go.
I want to echo a string based on the value of another string. ie $advts could equal a number of different things including p4u, lnk and cys. I then have a number of different strings such as $p4u, $lnk and $cys. I want to print the value of any one of these strings based on the value of $advts. I thought something like this would do the trick:
echo "$$advts";
but this results in giving me the name of a string rather than the value. Omg, that makes little sence at all, so, example,
$p4u = "hello world";
$advts = "p4u";
echo "$$advts";
should result in "hello world" being printed, insted i get "$p4u" being printed as php sees that first $ as being a piece of text and not the start of a string name.
Do i have to place something around the $advts part, to get this to work, can it even be done?
thanks,
jon.