array issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Keith Boesker
    New Member
    • Dec 2010
    • 14

    array issue

    Thanks in advance for your help!!!

    My issue is checking a array variable in a if statement to see if it empty.

    Like
    Code:
    if pram(2) = "" then
    if empty redirect
    else
    not empty run code
    end if
    This is how my array is created
    Code:
    strString=Request.ServerVariables("HTTP_X_ORIGINAL _URL")
    strArray = split(strString, "/")
    Redim pram(uBound(strArray))
    For i = 0 to uBound(strArray)
    pram(i) = strArray(i)
    Next
    I can get empty array by
    Code:
    if uBound(strArray) = -1 then
    But I want to check the second item in the array if it's empty. The first item in the array will exist but the second item may not exist and then I need the to redirect the user accordingly.
Working...