By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

array issue

P: 14
Thanks in advance for your help!!!

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

Expand|Select|Wrap|Line Numbers
  1. if pram(2) = "" then
  2. if empty redirect
  3. else
  4. not empty run code
  5. end if
This is how my array is created
Expand|Select|Wrap|Line Numbers
  1. strString=Request.ServerVariables("HTTP_X_ORIGINAL _URL")
  2. strArray = split(strString, "/")
  3. Redim pram(uBound(strArray))
  4. For i = 0 to uBound(strArray)
  5. pram(i) = strArray(i)
  6. Next
I can get empty array by
Expand|Select|Wrap|Line Numbers
  1. 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.
Jan 17 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.