# Flash,Php, and Mysql Looping all variables passed problem

**URL:** <https://forum.kirupa.com/t/flash-php-and-mysql-looping-all-variables-passed-problem/170217>\
**Category:** programming\
**Created:** [November 23, 2005, 8:08pm UTC](https://forum.kirupa.com/t/flash-php-and-mysql-looping-all-variables-passed-problem/170217 "2005-11-23T20:08:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boom1](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/boom1/32/1955_2.png) [@boom1](https://forum.kirupa.com/u/boom1)\
**Post date:** [November 23, 2005, 8:08pm UTC](https://forum.kirupa.com/t/flash-php-and-mysql-looping-all-variables-passed-problem/170217/1 "2005-11-23T20:08:45Z")

</div>

```php

foreach( $row as $field){
		 echo '<td>' . (is_null($field) ? 'NULL' : $field) . "</td>
";

		  $myfields[$c] = $field;
		  echo "&myname[$c]=$myfields[$c]&";
		  echo "&myname$c=$myfields[$c]&";
		  $c++;
	   }

```

```auto

myload = function(){
    
    vars2 = new LoadVars();
    vars2.load("load.php","","POST");
    vars2.onLoad = function(success){
        if(success){
            trace("LOADED");
            mycounter();
        }else{
            trace("not loaded");
        }
    }
}

mycounter = function(mynames){
    boom = new Array();
        boom2 = new Array();
    for(i=0;i<8;i++){
         boom* = vars2.myname*;    
         boom2* = vars2.myname + String(i);
             text1.text = vars2.myname*;
             text2.text = boom2*
             
     }
}

```

this part of code in flash :  
for(i=0;i\<vars2.mycount;i++){  
boom\* = vars2.myname\*;  
boom2\* = vars2.myname + String(i);  
//this does not work  
text1.text = vars2.myname\*;  
//this works  
text2.text = vars2.myname3  
//this does not work also  
text3.text = vars2.myname + String(i)  
//flash actually displays the value of i in the loop, and does not  
//concatenate the variable name + i  
}  
doesnt seem to get values in php using a for loop…  
flashtext.text = vars2.myname[2] Works well,  
but flashtext.text = vars2.myname\* inside a loop doesn’t work. ?

It gets the values as vars2.myname[1], or vars2.myname[4] by assigning a specific index number and assigning the variable in a text field, but using \* as an index in flash for loop doesn’t seem to work. Anyone pls help?
