[HELP] switch statement
please , how to use switch from 1 to 7 like 1,2,3,4,5,6,7
I know it should .. by default... but whan I use switch(1,7) or (1-7) it doesnt work. most time it uses last number and repeat it *(7) here I need to start each case from 1 to 7 every 12 secs case 1 = 12 sec, than case 2 after next 12 sec so when I use random_num it works like random..... but I need 1,2,3,4,5,6,7 in a row PHP Code:
|
Re: [HELP] switch statement
Use a static variable and increment it each times the function is called. And if the variables is equal to 7, then put it to 0, and etc...
|
Re: [HELP] switch statement
new "a" = what?
set "a" to 2 in case 1 and set it to 3 in case2?? |
Re: [HELP] switch statement
PHP Code:
|
Re: [HELP] switch statement
cant compile ,,, and need more .. after 7 --- start from 1 again
|
Re: [HELP] switch statement
PHP Code:
Sorry read first line and posted, read the next, now I'm not sure this will help anyway :? |
Re: [HELP] switch statement
thanks I solved it . in another way ...
|
| All times are GMT -4. The time now is 11:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.