Understanding Associative arrays
Posted: 12 Dec 2019, 12:45
I'm building a simple mailing list that I want to build using arrays. I've pointed to associative arrays. I've been reading about arrays for a week now. Still don't understand how they work exactly or how you manipulate them. I've looked for tutorials online but they seem pretty vague or convoluted. Please help. Mostly need the theory I think.
So if I want to make a simple list. say.
Name Email
brady [email protected]
jonny [email protected]
Lord Ragnarok [email protected]
I'm guessing I would put it as this:
Correct? just want to make sure syntax is correct also.
so here is my bogus code and as far as I understand.
My question is, how do I recall information?? I have a feeling that Msgbox is wrong, I also want to make sure I'm using the variables correctly and syntax is correct. I'm not really sure why but I've been really having trouble understanding the logic behind arrays. it seems like a 3rd-dimensional information table that I am having trouble picturing in my brain.
Thanks for the help.
So if I want to make a simple list. say.
Name Email
brady [email protected]
jonny [email protected]
Lord Ragnarok [email protected]
I'm guessing I would put it as this:
Code: Select all
Contacts := {brady {"email": "[email protected]"}, (jonny {"email": "[email protected]"}, (Lord Ragnarok {"email": "[email protected]"}}
so here is my bogus code and as far as I understand.
Code: Select all
array := jonny
Contacts := {brady {"email": "[email protected]"}, (jonny {"email": "[email protected]"}, (Lord Ragnarok {"email": "[email protected]"}}
msgbox, contacts[%array%]??????????
return
Thanks for the help.