# Variables from PHP

**URL:** <https://forum.kirupa.com/t/variables-from-php/87080>\
**Category:** flash\
**Created:** [April 18, 2005, 11:21am UTC](https://forum.kirupa.com/t/variables-from-php/87080 "2005-04-18T11:21:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjiminyjimjim](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jimjiminyjimjim](https://forum.kirupa.com/u/jimjiminyjimjim)\
**Post date:** [April 18, 2005, 11:21am UTC](https://forum.kirupa.com/t/variables-from-php/87080/1 "2005-04-18T11:21:20Z")

</div>

Hi

I’m creating an online catologue of cars. I have the variables being returned to flash from a PHP script - in the form &model1=fiat&model2=3 …etc etc

The PHP also returns a variable n which is the number of cars that is being returned.

What I now want to do is get flash to create the same movie for that n many times to display each car model.

if there are three cars returned then n = 3 and the variable names are like this

model1  
price1

model2  
price2

model3  
price3

How can I create a loop that repeats for n times and changes the varible name accordingly

So it would have the form something like this

for (n = 1 to 3)  
model(n)  
price(n)  
next n

thanks for you help
