Split function in Classic ASP tutorial!

This tutorial explains to you how to explode a string in classic ASP. There is a default ASP function already given in Classic ASP is called Split()

See the below code, Its pretty much easier as PHP explode() function(If you are a PHP developer!).

In the below script, we are using ( , ) as a delimiter to split the words.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<%
Dim YourString
Dim SpiltString
YourString = "This is beautiful, Isn't It?"
SpiltString= Split(YourString, ",")
response.write("First Split: "&SpiltString(0)&"<br>")
response.write("Second Split: "&SpiltString(1)&"<br>")
%>
<% Dim YourString Dim SpiltString YourString = "This is beautiful, Isn't It?" SpiltString= Split(YourString, ",") response.write("First Split: "&SpiltString(0)&"<br>") response.write("Second Split: "&SpiltString(1)&"<br>") %>
<%
Dim YourString
Dim SpiltString
YourString = "This is beautiful, Isn't It?"

SpiltString= Split(YourString, ",")

response.write("First Split: "&SpiltString(0)&"<br>")
response.write("Second Split: "&SpiltString(1)&"<br>")

%>

Leave a Reply

Theme: Overlay by Kaira
Agurchand