switch statement...
Posted: Mon Jan 31, 2005 6:19 am
Hello.
I am sending the switch statement i use.
Cases 1,2,3 are the results of a selection box that I use in my form.
What I need is NOT to print the values on screen (using the echo command) but save each value to a variable so I can use the value later.
Anybody can help?
Thanks in advance
switch ($tmethod) {
case "1":
echo= "value 1";
break;
case "2":
echo= " value 2";
break;
case "3":
echo= " value 3";
break;
}
I am sending the switch statement i use.
Cases 1,2,3 are the results of a selection box that I use in my form.
What I need is NOT to print the values on screen (using the echo command) but save each value to a variable so I can use the value later.
Anybody can help?
Thanks in advance
switch ($tmethod) {
case "1":
echo= "value 1";
break;
case "2":
echo= " value 2";
break;
case "3":
echo= " value 3";
break;
}