PDA

View Full Version : HELP - Access a variable that is named base on another variable



rkirmeier
December 13th, 2008, 03:17 PM
I want to store information in the reg for my different zones (not MC zones).

Let's say... mytable.Theater = "HDTV"

I want to be able to dynamically access this information by passing "Theater" in via a variable.
pld3 = "Theater" (passed in NR)

I want to access the string stored in "mytable.Theater" but using a variable instead of "Theater".

"mytable.pld3" should look for the string in "mytable.Theater"

Thanks!

rkirmeier
December 13th, 2008, 03:31 PM
I guess a better way to explain what I need to do is...

I need to access a variable that is named is based on another variable.

Rob H
December 13th, 2008, 04:32 PM
Use mytable[pld3]

rkirmeier
December 13th, 2008, 05:29 PM
Thanks for the solution!