# Array within an array

**URL:** <https://forum.kirupa.com/t/array-within-an-array/205351>\
**Category:** Uncategorized\
**Created:** [October 28, 2006, 12:06pm UTC](https://forum.kirupa.com/t/array-within-an-array/205351 "2006-10-28T12:06:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VoS](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@VoS](https://forum.kirupa.com/u/VoS)\
**Post date:** [October 28, 2006, 12:06pm UTC](https://forum.kirupa.com/t/array-within-an-array/205351/1 "2006-10-28T12:06:08Z")

</div>

good morning!  
im curious as to how i would go about to place an array inside another array to keep multiple data under one position…

```
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000] **var** [/COLOR] dataArray = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]Array[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

dataArray[COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR]=[COLOR=#000080]1[/COLOR];  
dataArray[COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR]=[COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR],[COLOR=#000080]2[/COLOR],[COLOR=#000080]3[/COLOR],[COLOR=#000080]4[/COLOR][COLOR=#000000]][/COLOR]  
dataArray[COLOR=#000000][[/COLOR][COLOR=#000080]2[/COLOR][COLOR=#000000]][/COLOR]=[COLOR=#FF0000]“hi”[/COLOR]  
[/LEFT]  
[/FONT]

so that this is traced  
ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR]  
\>\> [COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR],[COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR],[COLOR=#000080]2[/COLOR],[COLOR=#000080]3[/COLOR],[COLOR=#000080]4[/COLOR][COLOR=#000000]][/COLOR],[COLOR=#FF0000]“hi”[/COLOR][COLOR=#000000]][/COLOR]  
[/LEFT]  
[/FONT]

and something like this  
ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR]  
[/LEFT]  
[/FONT]

would produce  
ActionScript Code:  
[FONT=Courier New][LEFT]\>\> [COLOR=#000080]3[/COLOR]  
[/LEFT]  
[/FONT]

this offcourse is not the proper syntax to do this… but you get the general idea i hope.

Thanks

//VoS
