Easy way to check multiple equals?
I'm trying to check to see if a variable is equal to different strings.
I know you can do... Code:
How can I check to see if the variable is equal to multiple strings though? Example that doesn't work but shows my question: Code:
|
Re: Easy way to check multiple equals?
There is no easy way to do it. You can put those variables into an 2d array. When ever you call that function you can use a for loop. Then check if that variable is equal to those string you want to check with variable.
With equal it can only check one string at a time. So you have to call it multiple times. |
Re: Easy way to check multiple equals?
I thought about a loop before I posted this, but wanted to check if anything easier was out there.
Thanks |
Re: Easy way to check multiple equals?
Edit: What team06 describe.
PHP Code:
|
Re: Easy way to check multiple equals?
or:
PHP Code:
|
Re: Easy way to check multiple equals?
v3x ur signiture is getting cut off
|
| All times are GMT -4. The time now is 10:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.