Friday, July 3, 2009

VBScript / ASP Array_Slice Function

Almost as good as the PHP function Array_Slice()


Function Array_Slice(arr, start, newArray)
Dim x : x = 0
For i = start-1 to Ubound(arr)-1
ReDim Preserve newArray(x)
newArray(x) = arr(i)
x = x + 1
Next
Array_Slice = Ubound(newArray)
End Function

No comments:

Post a Comment