# (multidimensional arrays) i need your help pleasee!

**URL:** https://forum.kirupa.com/t/multidimensional-arrays-i-need-your-help-pleasee/73207
**Category:** Uncategorized
**Created:** [December 14, 2004, 8:15am UTC](https://forum.kirupa.com/t/multidimensional-arrays-i-need-your-help-pleasee/73207 "2004-12-14T08:15:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rvanet](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@rvanet](https://forum.kirupa.com/u/rvanet)
#### Post date: [December 14, 2004, 8:15am UTC](https://forum.kirupa.com/t/multidimensional-arrays-i-need-your-help-pleasee/73207/1 "2004-12-14T08:15:21Z")

</div>

Hey everyone!

Does anybody who can help me with this problem? My brain’s been saturated already. :crying: I think I am starting to get crazy on this. waah!  
Anyway, here’s the problem:

I have created 2 sets of arrays in one array and it works fine. Here’s the code:

```php

for (n=0; n<=2; n++) {
	_global["chapter"+n] = new Array();
	this["chapTimes"+n] = new Array();
	this["tempArray"+n] = new Array();
	this["temp"+n] = new Array();
	for (i=0; i<=(_global["tRequired"+n].length-1); i++) {
		this["tempArray"+n]* = i;
		this["tempArray"+n]* = _global["tRequired"+n]*;
		_global["chapter"+n]* = parseInt(this["tempArray"+n]*);
		this["tempArray"+n]* = this["tempArray"+n]*.lastIndexOf("(");
		this["temp"+n]* = _global["tRequired"+n]*.substring(this["tempArray"+n]*);
		this["chapTimes"+n]* = parseFloat(this["temp"+n]*.slice(1));
	}
}
trace("chapter"+n+": "+_global["chapter"+n]);

```

Now… the output will yield:  
chapter0: 1,2,3,4,5,…10  
chapter1: 1,2,3,…10

And now, what if from these outputs(chapter0 and chapter1) i would randomly select only 5 items? What should I do? Can somebody help me figure it out?  
:crazy: :diss:
