I.T. Discussion Community!
-Collapse +Expand
Coder
Search Coder Group:

Advanced
-Collapse +Expand Coder Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Coder Store
PRESTWOODSTORE

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCoding & OO BoardCoding Techniques Topic   Print This     

Associative Array

Associative Array in Coding Techniques topic (part of our Coding & OO group).

Quick Search: Associative   Associative Array  
swapna
Mumbai, -- IN

What is the difference between a normal and an associative array with the help of an example. can i get the explanation on the same?


(Moved from knowledge base.)

 Posted 11 years ago (Thread Starter)
Comment Quote
About swapna -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #12870, 1 replies
Thread Started 6/13/2008 4:22:14 AM
View Counter=5030
Last Reply Posted 6/18/2008 9:41:33 AM)
Location=Mumbai, -- IN 
Joined=12 years ago   MB Posts=1  
Most Recent Post
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA

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);

--
Mike Prestwood
Prestwood IT Solutions

 Posted 11 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

Post ID #12873 (Level 1.1)  Reply to 12870
Thread Started 6/18/2008 9:41:33 AM
Location=Prestwood IT office in Citrus Heights, CA 
Joined=19 years ago   MB Posts=1410   KB Posts=1805   KB Comments=73   BLOG, Topics=4  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1195A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #12870 Counter
5030
Since 6/13/2008

Regarding...

Linked Knowledge Base Article.

This thread is linked to the following KB article.


Mike Prestwood
1. Associative Array A set of unique keys linked to a set of values. Each unique key is associated with a value. Think of it as a two column table. MyArray['CA'] = 'California' MyArray['AR'] = 'Arizona'
Posted to KB Topic: General Coding Concepts
11 years ago, and updated 11 years ago

Definition
Nothing New Since Your Last Visit
14966
Hits

Coding & OO


Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech