# Dynamic var and array

**URL:** https://forum.kirupa.com/t/dynamic-var-and-array/161956
**Category:** Uncategorized
**Created:** [September 8, 2005, 2:48pm UTC](https://forum.kirupa.com/t/dynamic-var-and-array/161956 "2005-09-08T14:48:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scourtaud](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@scourtaud](https://forum.kirupa.com/u/scourtaud)
#### Post date: [September 8, 2005, 2:48pm UTC](https://forum.kirupa.com/t/dynamic-var-and-array/161956/1 "2005-09-08T14:48:30Z")

</div>

Hi,

I’ve got a little problèm with PHP that stalls me in building my flash/PHP/MySQL/PDF app…

First A flash movie allows you to create textfields and modifiy their layout. Then this flash movie sends data to PHP  
One array giving the name of the other : textes = new Array(“texte1”,“texte2”,“texte3”);  
and arrays texte1, texte2, texte3 which contains all the needed info on each textfield.

One in PHP, I need to use the data in those arrays to add the textfields to a PDF file I create on the fly.

My problem is :  
I know the name of the first array containing the list of existing arrays (textes)

i can display this array using : print\_r($textes);

I can display the textfields array (texte1, texte2, texte3) using :

for ($i=0;$i\<count($textes);$i++) {

```
print_r($$textes[$i]);
echo "&lt;br&gt;";

```

}

But I haven’t managed to display one value (the first one in the example) from the textfields array using :

for ($i=0;$i\<count($textes);$i++) {

```
 print_r(${$textes[$i]}[0]);
 echo "&lt;br&gt;";

```

}

what am i doing wrong?

Thanks in advance for any help / hint / advice.

Sebastien
