dcsimg

How can I use a string as an array index?

Firat Tiryaki

When initializing the value, just use the desired index, as in the following: myarray=new Array();
myarray["blah"]="blah blah blah";

the "blah" indexed element of myarray is equal to "blah blah blah" now.