$html_allowed = array(6,X,Y); foreach ($html_allowed as $ug) { if (is_member_of($userinfo, $ug) { $userinfo_sane = true; } if (is_member_of($post, $ug) { $post_sane = true; } } if(!$dohtml && !$usergroup_sane && !$post_sane)