# Array values to individual variables

**URL:** <https://forum.kirupa.com/t/array-values-to-individual-variables/190640>\
**Category:** flash\
**Created:** [June 13, 2006, 5:41pm UTC](https://forum.kirupa.com/t/array-values-to-individual-variables/190640 "2006-06-13T17:41:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRG](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@DRG](https://forum.kirupa.com/u/DRG)\
**Post date:** [June 13, 2006, 5:41pm UTC](https://forum.kirupa.com/t/array-values-to-individual-variables/190640/1 "2006-06-13T17:41:25Z")

</div>

Hello, I am trying to set variables from an array. I want my variables to be named Pic1, Pic2 etc. (according to how many values are in the array). How do I get this to work? Any help is appreciated.

**This is code from the “parsing external array data” tutorial**  
files = new Array();  
lv = new LoadVars();  
lv.onLoad = function() {  
fl = this.filelist;  
files = fl.split(",");  
c = files.length-1;  
for (i=0; i\<c; i++) {

```
    this["Pic"+i] = files*; //&lt;----not working

}

```

};  
lv.load(“[http://myfile.php](http://myfile.php)”);  
stop();
