Forum Moderators: open
var key, str = '';
for (key in myarray) {
if (str.length > 0) {str += ', '; }
str += key + '>' + myarray[key];
}
alert(str);
key - is just a variable to hold your array key (or object property)
myarray - is your array variable
str - is the resultant string with all the array (key>value) pairs concatenated, separated by ', ' (comma space).