Can i add a case into other case? and how?
Title say all
i want to know if its possible something like this: PHP Code:
|
Re: Can i add a case into other case? and how?
Sure.
Even if your indentation is bad, the syntax is right. |
Re: Can i add a case into other case? and how?
whit the same index of the main switch?
|
Re: Can i add a case into other case? and how?
I don't understand what you mean.
|
Re: Can i add a case into other case? and how?
PHP Code:
i need to use the same index (key) for both? |
Re: Can i add a case into other case? and how?
yea u can, but i dont see why you would want to :?
|
Re: Can i add a case into other case? and how?
Quote:
If key == key2 then the second switch will only ever exucute the same case. |
Re: Can i add a case into other case? and how?
Can you give me a example?
|
Re: Can i add a case into other case? and how?
I'm saying if key = key2 then only use one switch. If key != key2 then you can use nested switches, I'm sure it will be rare to actually "need" nested switches.
What are you trying to do? |
Re: Can i add a case into other case? and how?
I think you have to do:
PHP Code:
|
| All times are GMT -4. The time now is 02:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.