<if condition="in_array($forumid, array(1,2,3,4))"> <!-- Category 1 Ad Code --> <else /> <if condition="in_array($forumid, array(5,6,7,8))"> <!-- Category 2 Ad Code --> <else /> <!-- We're not in category 1 or 2 --> </if> </if>