Jump to content

Does what I want to do require array knowledge?


Recommended Posts

What I'm wanting to do is have a window pop up and have a spanish word, have an input box and have the user (me) input the english version of that word. I can do this one at a time with help from the "help file" (who would have guessed) but if I have like 50 vocab words I really dont want to input all the code for that. So if I inputted the spanish and english words in 2 different documents (or 2 columns would be great in excel or works) is array what I would need to pull spanish word #1 and match it with english word #1?

thanks mucho (lol)

Link to comment
Share on other sites

What I'm wanting to do is have a window pop up and have a spanish word, have an input box and have the user (me) input the english version of that word. I can do this one at a time with help from the "help file" (who would have guessed) but if I have like 50 vocab words I really dont want to input all the code for that. So if I inputted the spanish and english words in 2 different documents (or 2 columns would be great in excel or works) is array what I would need to pull spanish word #1 and match it with english word #1?

thanks mucho (lol)

you could put them in 2 sections of an .ini file and then use a for loop something like this.

dim $english[50]

dim $spanish[50]

for ($i = 0 to 49 step 1)

$spanish[$i] = iniread("englishspan.ini", "1", $i)

$english[$i] = iniread("englishspan.ini", "2", $i)

next

global $warming = true
Link to comment
Share on other sites

  • 3 weeks later...

Any info on how to make a .ini? I have no clue ha ha here I come google

Ini files are set up:

CODE
[section]

Key=Value

But you could also do a StringSplit():

$String = StringSplit("Mucho|Gracias|De Nada", "|")

It's return is the different phrases as a part of the array. So then your variables are already declared and you don't need an .ini. It's just word one would be $String[1]($String[0] is the number of phrases).

Edited by Minikori

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...