Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q5824 I have string values that look like this: "name, age, height" - How do I parse these so I can reference each value?

irt.org | Knowledge Base | ASP | Q5824 [ previous next ]

Q5824 I have string values that look like this: "name, age, height" - How do I parse these so I can reference each value?

Use the VBScript split funtion to return an array of the values separated by whatever character you specify.

<%

Dim someArray, myText

myText ="Jed, 21, 178cm"

someArray = split(myText, ",")

' someArray(0) = "Jed"
' someArray(1) = 21
' someArray(2) = "178cm"

%>

Feedback on 'Q5824 I have string values that look like this: "name, age, height" - How do I parse these so I can reference each value?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.