www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] split one long string into a multi-dimentional array?

  1. #1
    Join Date
    Jul 2010
    Location
    UK
    Posts
    28

    resolved [RESOLVED] split one long string into a multi-dimentional array?

    if i used this code to retrieve a form's elements and values, would i be able to split it down into (in this case) a 2 dimensional array? if so, how?

    Code:
    Dim i, arr1
    arr1=split(Request.Form,"&")
    
    for i=0 to ubound(arr1)
    --i'm guessing i'll need a loop of some sort?  
    next
    cheers
    "One should never increase, beyond what is necessary,
    the number of entities required to explain anything."

  2. #2
    Join Date
    Jan 2008
    Location
    Florida
    Posts
    1,227
    for x = 1 to request.form.count()
    if request.form.item(x)<>"" then ' checks to see if item is blank - won't send blank items
    if request.Form.key(x)<>"Submit" then
    response.write "<b>" & (request.form.key(x) & "</b> = ")
    response.write(request.form.item(x) & "<br>")
    End If
    End If
    next

  3. #3
    Join Date
    Jul 2010
    Location
    UK
    Posts
    28
    awsome, thanks
    "One should never increase, beyond what is necessary,
    the number of entities required to explain anything."

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles