/ Published in: ASP
Used when splitting array elements between two columns in HTML
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
'************************************************************ ' This function takes an array and prints out the first ' or second half of the array, defaulting to print the ' first half with one additional row if Length mod 2 is not 0. ' Prototyped by: Dan Smith '************************************************************ Sub PrintArrayHalf(Array,ArrayHalf) If ArrayHalf = 1 Then MiddleBound = ceil(UBound(Array) / 2)-1 For Counter = 0 to MiddleBound Response.Write (Array(Counter)) Next ElseIf ArrayHalf = 2 Then LowerBound = ceil(UBound(Array) / 2) For Counter = LowerBound to UBound(Array) Response.Write (Array(Counter)) Next End If End Sub