Advanced loadvars

the output of a .php page


&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

my question is concerning this piece of code in my script (see its context below)


	  what="id"+(x+1);
          newsItems[x][0] = myVars.what;

if i write instead of what ‘id1’ i get the infromation stored in myVars.id1 but if i do it this way with what=“id”+(x+1); it does not return the info i want
the reason i need to do this is there will be as many id# as ‘total’ proclaims
and i want to enter each one into a diferent row in my 2d array

dunno if this image helps to explain what im trying to do , but whatever :wink:

this array will be huge when the flash movie gets put into action , therfore i want to use my ‘what’ way of telling it what to put into each array slot, since i cannot type out ‘id1’, ‘text1’ for each one of em, because i really dont know how many there will be when im done (and it will change from moment to moment)
so my question is. why does not my way of telling it which variabel to retrive work, (im guessing its because it thinks i want the variable named what, and does not look to see what what actually contains)

so i need help or suggestions on how to make myVars.what get the variabel inside what and not look for the variable what itself

well any help is appreciated



newsItems=new Array();
myVars = new LoadVars();
myVars.load("http://xev.mine.nu/nyheter/news.php?search=","0");
myVars.onLoad = function() {	
	total=myVars.total;
	for (x=0;x<=(total-1);x++) {
		newsItems[x] = new Array();
		what="id"+(x+1);
                newsItems[x][0] = myVars.what;
		//newsItems[x][0] = x;
		what="titel"+(x+1);
		newsItems[x][1] = myVars.what;
		//newsItems[x][1] = x+"q";
		trace(newsItems[x][0]+","+newsItems[x][1]);
	}
}	


Thanks
//VoS

P.S. hope this wasent too confusing, ill try to clarify any questions further :wink: