Trying to do the equivalent to this shell fragment
set -A MyArray1 q w e r t y
set -A MyArray2 a s d f g h
x=1
eval print \${MyArray${x}}
If you're familiar with unix, the first parse (eval) expands ${x} to 1, and removes the
The second parse expands to ${MyArray1} and prints q w e r t y...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.