TommyIndigo
Programmer
I am using LoadVars to retrieve a result from PHP. The echoed result is something like:
&name1=bill&city1=chicago&name2=alice&city2=austin&
I am trying to load the result such as above into a Flash array, such that the final array values would be:
name[0]=bill
city[0]=chicago
name[1]=alice
city[1]=austin
Assuming the LoadVars object is named "container", I can certainly load an explict variable in using something like:
However, I would like to use a For loop to dynamically loop through the result and do something like:
That idea doesn't work, but would there be a way that I can programatically select the result's variable based on a counter??
&name1=bill&city1=chicago&name2=alice&city2=austin&
I am trying to load the result such as above into a Flash array, such that the final array values would be:
name[0]=bill
city[0]=chicago
name[1]=alice
city[1]=austin
Assuming the LoadVars object is named "container", I can certainly load an explict variable in using something like:
Code:
name[0]=container.name1
However, I would like to use a For loop to dynamically loop through the result and do something like:
Code:
name[i]=container.name[++i]
That idea doesn't work, but would there be a way that I can programatically select the result's variable based on a counter??