Create multiple text fields using for()

I’m using php (my native language) to populate content in my mc, and being new to AS I’m having trouble creating a script that will, essentially, create a text field for every record displayed via php/mysql. The basic idea of what I was thinking was something along the lines of


for(i = 0; i < phpRows; i++) {
this.createTextField("myPHPText"+i, 1, x, y, 10,10);
this.myPHPText_txt+i.text = phpVar+i;
}

I’ve used LoadVars() plenty of times to load static/specific variables into text fields in places where I’m only calling one row of data, but in this instance where I’m pulling multiple rows from a db and my php output would look something like…

phpVar1=somethignsomethingsomething
phpVar2=somethingsoemthingsomething
phpVar3=somethingsomethingsomething

then I’m not sure how to create the appropriate code in AS to handle a text field for every php variable. Thanks for looking!