# Tricky multidimensional array!

**URL:** <https://forum.kirupa.com/t/tricky-multidimensional-array/70095>\
**Category:** Uncategorized\
**Created:** [November 10, 2004, 5:50pm UTC](https://forum.kirupa.com/t/tricky-multidimensional-array/70095 "2004-11-10T17:50:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Limitlis](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/limitlis/32/788_2.png) [@Limitlis](https://forum.kirupa.com/u/Limitlis)\
**Post date:** [November 10, 2004, 5:50pm UTC](https://forum.kirupa.com/t/tricky-multidimensional-array/70095/1 "2004-11-10T17:50:04Z")

</div>

**Hey Flasherz!**  
lol. I can’t seem to get my combobox to work right. _Let me paint the scenerio._  
I have my multidimensional array:

```auto
 nissan = [["altima","1984","2005"], ["maxima","1976","2005"] ];

```

Then I have my two comboboxes:

```auto
**model_cb** and
**year**

```

heres my AS:

```auto
 function setYearCombo() {
year.removeAll();
var subArray = model_cb.getSelectedItem().data;
begDate = subArray+'[1]';
endDate = subArray+'[2]';
for(i=begDate; i<endDate; i++){
year.addItem(i); }
}

```

when I do this my “year\_cb” displays \>\> nissan[0][1] or nissan[1][1] depending on if you choose altima or maxima.

So I’ve gotten it to do that much but now I need it to display the corresponding year for the part in the array i.e. plug in “1984” (nissan[0][1]) and populate the combobox through 2005 (nissan[0][2]).

when I use this code:

```auto
 for(i=nissan[0][1]; i<nissan[0][1]; i++){year.addItem(i); 

```

it does plug in my desired years although it is static with that (nissan[0]/altima) years.

Can anyone please help me out. Hopefully I’ve given enough info. My file is to big to include even after zipping. I have a feeling that its something simple or maybe I’m just hoping it is simple.

Any help is Greatly Appreciated.

Thanks in advance,  
**Limitlis**
