Variables Variable (Creating variable with the name of another variable)
<p>i want to create a new variable with a variable name,
for example:</p>

<pre><code>function preloader(imglist) {

  var imgs = imglist.split("|");

    for (i in imgs) {

      var img_{i} = new Image;  //this is the line where i sucked in!
      img_{i}.src = imgs[i];    //another line where i sucked in!

    }
}

preloader("asd.jpg|qwe.jpg|dorama.png");
</code></pre>

<p>i try to use arrays but, hmm.. how can i say...</p>

<pre><code>var qwe = new Array();
qwe[1] = "asd"; //or not! whatever...

var qwe[1] = new Image; // it didnt work!
</code></pre>

<p>in php u can use like this:</p>

<pre><code>$var1 = "test";
$var2_{$var1} = "test last";
echo $var2_test; //or...
echo $var2_{$var1};
</code></pre>
