# Need Help Renaming Dynamic Variables

**URL:** <https://forum.kirupa.com/t/need-help-renaming-dynamic-variables/243621>\
**Category:** flash\
**Created:** [November 8, 2007, 11:16pm UTC](https://forum.kirupa.com/t/need-help-renaming-dynamic-variables/243621 "2007-11-08T23:16:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevisazombie](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kevisazombie/32/3903_2.png) [@kevisazombie](https://forum.kirupa.com/u/kevisazombie)\
**Post date:** [November 8, 2007, 11:16pm UTC](https://forum.kirupa.com/t/need-help-renaming-dynamic-variables/243621/1 "2007-11-08T23:16:55Z")

</div>

Hi All,

I think I’ve put myself in a corner on this one. I have a PHP script that dynamically passes some variables to my .swf. The variables come into the .swif named like: imageCount1, ImageCount2, imageCount3 etc. I am trying to put these into an array to work with. Heres what I have so far

```auto
imageCount0 = "image/ohyeah.jpg";
imageCount1 = "image/party.jpg";
finalCount = 2;
imageHolder = new Array();

for(i=0; i < finalCount; i++){
    imageHolder.push(imageCount+i);
}

```

The problem I’m having is when I goto .push the array it combines the strings instead of calling the imageCount variable with the correct number attached. Can anyone think of a technique to work around this or some where I can look to get an id. Any help is appreciated. Thanks.
