Checking if a number is either X, Y, or Z
Frequently, you want parts of your hack to only be accessible by moderators and admins.
To do so, you use this if-block: PHP Code:
A much more elegant solution would be to use in_array(): PHP Code:
PHP Code:
PHP Code:
|
Very nice firefly. This is very helpful... I really didnt like arrays but I am starting to see the usfulness in them. :D
|
Great info Firefly...very much appreciated, thank you! Can someone post something about joins? I am trying to something using joins and it just isn't working right.
|
Post in the PHP forum about it and I'll see what I can do. :)
|
Firefly, that's good, but for performance you should really use a switch as this would prevent the test of an array, convert to an array and loop through array stuff that happens partly implicitly...
try something like... PHP Code:
|
All times are GMT. The time now is 02:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|