MyBB Community Forums

Full Version: Multiple units in if statement
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Straight forward,

<if $post['usergroup'] == 4 then>

I need more usergroups to be effected by this if statement. Like usergroup 21 and 69 for an example. How to add more than one usergroup?

Thanks o/
You can probably do:

 <if in_array($post['usergroup'], array(4,21,69)) then>

I don't use the PHP conditionals plugin but have seen in the past it allows regular PHP functions so give it a go Smile