<vb:if condition="in_array($threadinfo['forumid'], array(1,2))"> ad code <vb:elseif condition="in_array($threadinfo['forumid'], array(3,4))"> ad code <vb:elseif condition="in_array($threadinfo['forumid'], array(5, 6))"> ad code </vb:if>