|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
2 dimensional array from a delimited string
Hi guys
I need to create a 2 dimensional array from a string with 2 kinds of delimiters sample string: Code:
1=1|2=2|3=3|4=4 in this case, the delimiteers are = and | so my array would look something like this: Code:
------------- | 1 | 1 | ------------- | 2 | 2 | ------------- | 3 | 3 | ------------- | 4 | 4 | ------------- I have trid the following code, but ofcourse it failed me: ASP Code:
If got the following error: Code:
Microsoft VBScript runtime error '800a000d' Type mismatch: 'arr' /asp/2darray.asp, line 4 Is the a built-in ASP function to achieve what I am after, or is this something that I will need to create a special finction in my cocde to achieve? Any help is appreciated.
__________________
Alex - Lucky Number 13 Did I do something that helped you? - please click the scales and help my rep
Last edited by alexk13 : October 22nd, 2007 at 12:09 AM. |
|
#2
|
|||||
|
|||||
|
I Found a solution - might not be the best solution but it does work
Just in case anyone else has a similar problem, here is my solution: ASP Code:
|
|
#3
|
|||
|
|||
|
Thanks for posting the update
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > 2 dimendional array from a delimited string |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|