Hi,
I'm not sure how to describe what i want to do, so I'll ask by way of example. I want to do something like:
#########################
$size="L";
$num=29;
$qs="?size=$size&num=$num";
echo "<a ref url=\"$qs\">Click here for default link</A>";
-snip- ....processing.......
if (x) {$size="M";} else {$size="S"; }
-snip-... more processing.......
if (y) {$num++;} else {$num += 10;}
-snip-... more processing.......
and have this echo stmt resolve $qs to be whatever the values of
the num and size variables have been set to.
echo "<a ref url=\"$qs\">Click here for dynamic link</A>";
-snip-... still more processing.......
echo "<a ref url=\"$qs\">Click here for dynamic link</A>";
#########################
Basically, want to avoid haveing to keep redefining $qs.
I was looking at 'variable variables', but can't figure out if/how that would be applied here.
Thanks in advance for any pointers.
🙂Ben