Falconix
04-29-2003, 08:15 PM
Say I have array called "index". It contains these values:
index[0] = 3;
index[1] = 6;
index[2] = 2;
...
I want to access an array called "files," in this way:
var info = files[index[0]][index[1]][index[2]][index[...]];
The catch is, "index" can contain any amount of index/variable pairs. I can find out that amount easily; that isn't the problem. Does anyone know how I can access "files" in a way where the amount of dimensions there are is determined by the size of "index"? I've been experimenting, but can't really come up with anything.
:)
index[0] = 3;
index[1] = 6;
index[2] = 2;
...
I want to access an array called "files," in this way:
var info = files[index[0]][index[1]][index[2]][index[...]];
The catch is, "index" can contain any amount of index/variable pairs. I can find out that amount easily; that isn't the problem. Does anyone know how I can access "files" in a way where the amount of dimensions there are is determined by the size of "index"? I've been experimenting, but can't really come up with anything.
:)