Replace words in a string

In this example we will use the Replace function to replace a word in a string with a different word . In this example we replace the word ASP with the word php.

Here is the script

<%
Dim strText
'here is our original text
strText = "welcome to my beginners ASP"
'display the modified text
Response.Write (Replace(strText , "ASP", "php"))
%>

 

Sponsors