|
An associative array links one set of unique values with another set of values (not necessarily unique). Think of an associative array as a two column table. An array is just a set of values. Think of a regular array as a single column table. I also know associative arrays as "dynamic arrays" in ObjectPAL, a "lookup" table in DBA terms, and dictionaries or HashTables in C#. You didn't say which language you wanted an example in so here's an example in C#: Hashtable MyHTable = New HashTable();
MyHTable.Add("Milpitas", 95035); MyHTable.Add("Citrus Heights", 95610);
|