Array Linking

Results 1 to 3 of 3

Thread: Array Linking

  1. #1
    coolRay Guest

    Default Array Linking

    How would I link the below arrays where one deals with questions and the other deals with answers? The one that deals with questions will have answers inputted by a user. If there is a match to the answer array, the answer will be correct, otherwise it will be incorrect. The user&#039s answer will then be outputted on the next page. A novice programmer needs help.<BR><BR>&#060;% DIM strQuest(2)<BR> strQuest(0) = "What is the color of a Blue Jay?"<BR> strQuest(1) = "What is the color of a Cardinal?"<BR> strQuest(2) = "What is the color of an Eagle?"<BR> <BR> For intCount = 0 to 2<BR> Reponse.Write strQuest(intCount)<BR> %&#062;<BR> <BR>&#060;% DIM strAnswer(2)<BR> strAns(0) = "Blue"<BR> strAns(1) = "Red"<BR> strAns(2) = "Brown"<BR> %&#062;<BR>How would I go about linking this?<BR><BR>Thanks!<BR><BR>coolRay

  2. #2
    Join Date
    Dec 1969

    Default RE: Array Linking

    Have you considered using the Dictionary object, it would be ideal for this 1:1 associative array relationship thing you&#039ve got going on...<BR><BR>More info:<BR><BR><BR>Good Luck.

  3. #3
    Join Date
    Dec 1969

    Default RE: Array Linking

    have you tried the 2 dimensional array where a(1,1) will be your first question and a(1,2) will be your first answer.A dictionary is good too but there is the case of you not being able to access the values of a dictionary unless the page where the dictionary was created was "hit".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts