# 2d array

**URL:** https://forum.kirupa.com/t/2d-array/73251
**Category:** flash
**Created:** [December 14, 2004, 3:49pm UTC](https://forum.kirupa.com/t/2d-array/73251 "2004-12-14T15:49:00Z")
**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: [December 14, 2004, 3:49pm UTC](https://forum.kirupa.com/t/2d-array/73251/1 "2004-12-14T15:49:00Z")

</div>

im trying to put a few items from a page into a 2d array,  
the page output looks like this

```auto

&id1=1&titel1=test&text1=lite text här&picone1=ingen1&pictwo1=ingen2&picthree1=ingen3&footer=lite mer fotnot&ort1=Tranås&
&id2=2&titel2=test2&text2=test text Aneby&picone2=1&pictwo2=2&picthree2=3&footer=ingen fotnot&ort2=Aneby
&id3=41&titel3=test23&text3=inget&picone3=asd&pictwo3=sd&picthree3=&footer=s&ort3=Aneby Tranås ÖdeshÖG
&id4=42&titel4=jacuzzi&text4=weeee&picone4=http://xev.mine.nu/edit.jpg&pictwo4=none&picthree4=NOE&footer=grattis&ort4=holaveden
&total=4

```

and i just tried to put the first two things into the array, but I crashed and burned horribly, any suggestions or alternate ways i could do this  
(no xml, im reading info in off a mysql database thru .php)

```auto

myVars = new LoadVars();
//id1=1&titel1=test&text1=lite text här&picone1=ingen1&pictwo1=ingen2&picthree1=ingen3&footer=lite mer fotnot&ort1=Tranås&
//total=###
var newsItems:Array = new Array();
myVars.load("http://xev.mine.nu/nyheter/news.php?search=","0");
myVars.onLoad = function() {	
	total=myVars.total;
	for (x=1;x<=total;x++) {
		/////
		what="id"+x; //im guessing its this and the next line i cant do
		newsItems[x,1]=myVars.what;		
		trace(newsItems[x,1]);
		/////
		what="titel"+x;
		newsItems[x,2]=myVars.what;		
		trace(newsItems[x,2]);
		
	}
}	
stop();

```

any help appreciated 😉

P.S. the total=4 is there for a reason , there will be different ammounts of lines almost everytime
