Click to See Complete Forum and Search --> : Need Quick Help With Arrays


wavix
02-19-2003, 03:18 PM
I need HELP! I'm trying to create a multi-dimensional array and when I create the following, I can't get to any of the values:

theArray = new Array();
theArray[0] = new Array();
theArray[0][0] = new Array();
theArray[0][0][0] = "$1,950.00";
theArray[0][0][1] = "$1,950.00";

Did I set it up in the right way? Just running a 2-d array seems to work fine.

Thanks for the help....

David

AdamBrill
02-19-2003, 04:45 PM
hmm... It worked for me. How did you reference the values? They should be like this:

alert(theArray[0][0][0]);

Doing it like that worked for me. Let me know if that works...

wavix
02-19-2003, 04:58 PM
Sometimes you just need to look at things from a different perspective. My script was rewriting the

theArray[0] = new Array();

line more than once and causing trouble. Thanks for prompting me to look at it in a different way.

D.