Hey folks. I have searched high and low for the answer to what seems to be a simple problem. Perhaps I don't know how to describe the title properly so if this has been dealt with before, please forgive me.
I would be glad to take an answer for this in Actionscript, Javascript, or PHP. (because I have run into the problem in all 3 scripting langs.)
Color1 = "red"
Color2 = "blue"
Color3 = "green"
function showColor(num) {
.... help here
}
The function passes a number only. I want to use showColor(1) to print "red" but can't figure it out.
The only things I can ever get are undefined variables or the word "Color1".
I would be glad to take an answer for this in Actionscript, Javascript, or PHP. (because I have run into the problem in all 3 scripting langs.)
Color1 = "red"
Color2 = "blue"
Color3 = "green"
function showColor(num) {
.... help here
}
The function passes a number only. I want to use showColor(1) to print "red" but can't figure it out.
The only things I can ever get are undefined variables or the word "Color1".
Comment