IT SOLUTIONS
Your TECHNOLOGY partner! 
-Collapse +Expand
Coder
Search Coder Group:

Advanced
-Collapse +Expand Coder Group Home
-Collapse +Expand Message Board
-Collapse +Expand Coder KB
-Collapse +Expand Coder Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Coder Store
PRESTWOODSTORE
-Collapse +Expand Members Only

Prestwood eMagazine

May 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

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 59 months ago (Thread Starter)
Comment Quote
Location=Mumbai IN,  Joined=6 years ago   MB Posts=1  
More... -Collapse +Expand
swapna
Mumbai IN
Rank: Cadet 3rd Year
Email A E IN
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=2687
Last Reply Posted 6/18/2008 9:41:33 AM)
Most Recent Post

Mike Prestwood

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 59 months ago
Comment Quote
Location=Prestwood IT office in Citrus Heights, CA,  Joined=13 years ago   MB Posts=1398   KB Posts=1490  
More... -Collapse +Expand
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Rank: Fleet Admiral
Email A E CA USA
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

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:

Enter your name and security key.

Your Name:
Today's security key = P235A
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #12870 Counter
2687
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
59 months ago, and updated 59 months ago

Definition
Nothing New Since Your Last Visit
5187
Hits

Coding & OO

-
  Load Time=1 seconds.
 
Print This
-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


24 People Online Now!!  
Online Now: Sign In to see who's online now!  Not a member? Join now. It's free!
Show More...


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