% function getColA() ' simulate fetch from DB dim res(1) res(0) = 11 res(1) = 12 getColA = res end function function getColB() ' simulate fetch from DB dim res(2) res(0) = 21 res(1) = 22 res(2) = 23 getColB = res end function function getColC() ' simulate fetch from DB dim res(0) res(0) = 31 getColC = res end function function getVal(x, i) if i <= ubound(x) then getVal = x(i) else getVal = "" end if end function %> <% dim a, b, c a = getColA() b = getColB() c = getColC() dim n n = ubound(a) if ubound(b) > n then n = ubound(b) end if if ubound(c) > n then n = ubound(c) end if %>
A | B | C |
---|---|---|
<%=getVal(a, i)%> | <%=getVal(b, i)%> | <%=getVal(c, i)%> |