# Multi-level Arrays (help please)

**URL:** <https://forum.kirupa.com/t/multi-level-arrays-help-please/238702>\
**Category:** flash\
**Created:** [September 14, 2007, 1:11am UTC](https://forum.kirupa.com/t/multi-level-arrays-help-please/238702 "2007-09-14T01:11:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BetaWar](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@BetaWar](https://forum.kirupa.com/u/BetaWar)\
**Post date:** [September 14, 2007, 1:11am UTC](https://forum.kirupa.com/t/multi-level-arrays-help-please/238702/1 "2007-09-14T01:11:46Z")

</div>

Okay, so I am in the process o fmaking an image gallery, and now that I have gotten so far (okay to the point where this part of the application matters due to placement and loading time issues) I am unabel to get it to work. I have a muti-leveled array in whcih I am storying all of my information for the gallery, it looks somewhat like so:

Array  
-images  
–gallery 1  
—image 1  
—image 2  
–gallery 2  
—image 1  
—image 2  
–and so on  
-titles  
–gallery 1  
…  
you get the point.

Now the problem is that I need to get the length of say Array-images–gallery 1, but it keeps coming up with undefined or NaN when I attempt to trace out the value. Does anyone know what may be the reason for this? How do I get around this type of issue?

This will be used to loop through the images, but only show a max of 27 per page, assuming I can ever get it to work out.

Here is an example of the code I am currently using (and isn’t working):

```auto

trace(_galleries['images'][galleryNumber].length);

```

Where ‘images’ is simply the sub-array of galleries, and galleryNumber is yet another sub-array, but this time is a variable and not the name of an array.

Thanks for any and all help in advance,  
BetaWar
