Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

js key value array

var myArray = {id1: 100, id2: 200, "tag with spaces": 300};
myArray.id3 = 400;
myArray["id4"] = 500;

for (var key in myArray) {
  console.log("key " + key + " has value " + myArray[key]);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #key #array
ADD COMMENT
Topic
Name
8+3 =