Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extracting name-value pairs from an array of querystrings 1

Status
Not open for further replies.

cm80

Technical User
May 3, 2001
85
US
Hi,
I have an array of querystrings from which I want to extract the separate name value pairs.

For example I have a number of querystrings like the one below and I want to be able to loop through and extract each of the 'Fund' and 'asp' values in the array

deviceid=B5B0C9-249E-1100000-9B91-00902787507C&zipcode=unknown&Fund=BAL&asp=modules/abc/default.asp

Does anyone have any idea where I could start please.
 
You need to set up a loop to extract the data you want. You could do it something like:

'get the number of items in your array
CounterStop = ubound(aryQueryString)

for i = 0 to CounterStop
'split the array value on &
aryTemp = split(aryQueryString(i),"&")
'Looking at the temporary array you've created, Fund is position 2 and asp is position 3 so
aryFund(i) = aryTemp(2)
aryASP(i) = aryTemp(3)
Next

You can retrieve the fund and asp data by creating a similar loop and pulling the data back out. You can look here for more info
Hope that helps,
Joli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top