Or you can specify an array of allowed values, and check if the input is in the array.
PHP Code:
$allowed = array('home', 'pages', 'settings'); if (in_array($adminmodule, $allowed)) { // ... }
This aproach is simpler if you have many values, rather than having to write alot of if/else cases or use alot of || and &&. In your case, however, any method is fine.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
|