![]() |
Multiple Parameters for Conditionals
I am writing a basic PHP conditional script that uses vBulletin's global.php to display different messages for different user levels. I want to have the same message display for those who have userlevels 1 and 3. I know how to write it with elseif syntax, like:
PHP Code:
PHP Code:
Edit-accidentally left out a bit of the code. |
You should be able to do something like this without problems:
PHP Code:
|
Will this work?
PHP Code:
|
Both methods work. Thanks for the help
|
yes, but you should prefer the or, its easier to read :)
also this method works and looks much better for more than two groups: PHP Code:
|
I was going to post that but since it was only 2, I went with the "or". ;)
|
*gg*
even when there are just two it's shorter as you can see ;) and so it's easy to add another group, so why don't just give him the solution for make it easy and fast ;) |
You're right, I should have gone the other route. I usually use the "or" if it is only 2 though. Habit more than anything, I guess. ;)
|
All times are GMT. The time now is 01:42 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|