/ Published in: ASP

Learn how to emulate ASP.NET's AppendFormat method in Classic ASP. AppendFormat is essentially a simple form of concatenation in ASP.NET.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function AppendFormat(input,arr) for i = 0 to ubound(arr) input = replace(input,"{" & i & "}",arr(i)) next AppendFormat = input end function response.Write AppendFormat("Lorem ipsum dolor sit {0} {1} amet, consectetur {1} adipiscing {1} elit.", array("TEST","TEST2"))
URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=54
Comments
