Hi,
I'm having a problem doing something that I know I used to do (a long time ago)
I think it is referred to as variable variables.
What needs to happen is that a variable name is dynamically generated in the script, and I need to get the value of that variable name.
I have various arrays set up with the variable names keyed on the track number they are following.
Here is the test that I am running and not getting what I need
//assign the array values
$x2=array(1 => 2,3,37.5,0);
//define the track being followed
$track=2;
//dynamically create the variable name
$show='$x'.$track.'[1]';
//Display the results to verify
print"show is $show<br>value of show is ".$$show."<br>";
The results I get are
show is $x2[1]
value of show is
and what I expected to get is
show is $x2[1]
value of show is 2
I have tried numerous variations on what should be a simple script, but can't seem to get it to do what I think it should.
Could someone straighten me out, or at least head me in the right direction? Or am I just way off base?
If what I'm asking doesn't make sense, please someone let me know so I can clarify.. This is extremely important at this point, and I could really use some assistance.
Thanks in advance.
doug