|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
arrays, form variables and ubound
ok i'm trying to assign a form variable to an array, and then getting the ubound (how many elements).
so request.form("ok") as a string looks like this ok, ok, ok, ok but then when i try to make it an array out of it it doesn't look like its working. here is my code and output Code:
<%stringval = request.form("ok")%>
<%=stringval%>
<%funky = array(stringval)%>
<%=isarray(funky)%>
<%=ubound(funky)%>
and the output ok, ok, ok, ok, ok True 0 So why am i getting '0' for ubound when there should be any number of items in the array. help!
__________________
My brain cells are like a storm trooper's armor: useless |
|
#2
|
|||
|
|||
|
Use Split()
<% Dim MyArr Dim MyString MyArr = Split(MyString, ", ") Response.Write Ubond(MyArr) NOTE: The delimiter is NOT just a comma, its a COMMA-SPACE %> Hope this helps! Sincerely Vlince |
|
#3
|
||||
|
||||
|
thanks! works perfect!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > arrays, form variables and ubound |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|