# URLVariables - multiple variables with the same name

**URL:** <https://forum.kirupa.com/t/urlvariables-multiple-variables-with-the-same-name/296698>\
**Category:** flash\
**Created:** [September 18, 2009, 1:27pm UTC](https://forum.kirupa.com/t/urlvariables-multiple-variables-with-the-same-name/296698 "2009-09-18T13:27:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aktionskrift](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@Aktionskrift](https://forum.kirupa.com/u/Aktionskrift)\
**Post date:** [September 18, 2009, 1:27pm UTC](https://forum.kirupa.com/t/urlvariables-multiple-variables-with-the-same-name/296698/1 "2009-09-18T13:27:42Z")

</div>

Hi guys(and girls),

I got a problem with URLVariables

probably better to show by example

```auto

for each(var foo:String in fooArray){
                    variables.foo = foo;
                }

```

this unfortunately doesn’t work as intended as the old foo variable in the URLVariables get overridden each time.  
Thus when I output the variables as such

```auto

trace(variables.toString());

```

…it only outputs the latest foo variable in the querystring.

Tried looking around the net for it but couldn’t find anything. Also it seems logical enough that the variable gets overridden and I wouldn’t really question it if it wasn’t that i´ve been told the querystring should contain multiple definitions of the foo variable…

Perhaps I should construct the querystring by hand… but I’m not sure thats possible?  
-edit. That is possible… just pass it in as a parameter to the URLVariables object constructor!
