Top "Associative" questions

This tag is used mostly regarding associative arrays (but better use tag "associative-array" for that) and sometimes in the mathematic sense of tag "associativity", the associative property of binary operations.

How do I remove objects from a JavaScript associative array?

Suppose I have this code: var myArray = new Object(); myArray["firstname"] = "Bob"; myArray["lastname"] = "Smith"; myArray["age"] = 25; Now if I …

javascript arrays associative-array associative
How to sort an associative array by its values in Javascript?

I have the associative array: array["sub2"] = 1; array["sub0"] = -1; array["sub1"] = 0; array["sub3"] = 1; array["sub4"] = 0; What is the most …

javascript arrays sorting associative
CSV to Associative Array

I've seen numerous examples on how to take a CSV file and then create an associative array with the headers …

php arrays csv associative
Is array both associative and indexed?

Can an array in JavaScript be associative AND indexed? I'd like to be able to lookup an item in the …

javascript arrays indexing associative
Initialize an Associative Array with Key Names but Empty Values

I cannot find any examples, in books or on the web, describing how one would properly initialize an associative array …

php arrays initialization associative
Create an associative array in php with dynamic key and value

I want to create an associative array in php with dynamic key and also a dynamic value from a particular …

php arrays associative
How to convert a simple array to an associative array?

What is the fastest way to convert a simple array to an associative array in PHP so that values can …

php arrays dictionary associative
What is the most efficient way to get the first item from an associative array in JavaScript?

I need to get just the first item (actually, just the first key) off a rather large associative array in …

javascript jquery arrays associative
Change an associative array into an indexed array / get an Zend_Table_Row_Abstract as non-associative

Hi out there in Stackland. I was wondering if there was either a function or an easy way to change …

php zend-framework associative-array associative
JavaScript "associative" array access

I have a simple simulated array with two elements: bowl["fruit"] = "apple"; bowl["nuts"] = "brazilian"; I can access the value …

javascript arrays associative