Nov 20, 2001 #1 tyris Programmer Nov 2, 2000 311 FR hi, i'd like to know if there"s a way to define a string for an array index, in stead of a number, something like : myarray["blah"] is it possible ? Best regards, Elise, XML learning girl X-)
hi, i'd like to know if there"s a way to define a string for an array index, in stead of a number, something like : myarray["blah"] is it possible ? Best regards, Elise, XML learning girl X-)
Nov 20, 2001 #2 mackey333 Technical User May 10, 2001 563 US you got it right there....arrayName["billy"] -Greg :-Q Upvote 0 Downvote
Nov 20, 2001 #3 Bentley22 Programmer Aug 29, 2001 205 CA Yup, associative(sp?) array. myPhnNum["bob", "tony", "burt", "ed"]; myPhnNum["bob"]="555-1234"; myPhnNum["tony"]="555-7254"; myPhnNum["burt"]="555-1933"; myPhnNum["ed"]="555-2235"; alert("Bob's phone number is " + myPhnNum["bob"]); Upvote 0 Downvote
Yup, associative(sp?) array. myPhnNum["bob", "tony", "burt", "ed"]; myPhnNum["bob"]="555-1234"; myPhnNum["tony"]="555-7254"; myPhnNum["burt"]="555-1933"; myPhnNum["ed"]="555-2235"; alert("Bob's phone number is " + myPhnNum["bob"]);
Nov 21, 2001 #4 tsdragon Programmer Dec 18, 2000 5,133 US Yes, you spelled "associative" correctly. Tracy Dryden tracy@bydisn.com http://www.bydisn.com Meddle not in the affairs of dragons, For you are crunchy, and good with mustard. Upvote 0 Downvote
Yes, you spelled "associative" correctly. Tracy Dryden tracy@bydisn.com http://www.bydisn.com Meddle not in the affairs of dragons, For you are crunchy, and good with mustard.