一个asp数组的应用
这次用没有破坏数组的整体!
<%
'*****************
'函数:mysplit
'参数:str
'用法:把aa,bb,cc这样的一个字符串,用","分开,变成每一个两边加上"'"
'说明:chr(39),是"'"的值
'*****************
function Mysplit(str)
if isnull(str) then
str=""
end if
Str = Split(Str,",")
while kk=<ubound(Str)
Mysplit=replace(Mysplit&chr(39)&Str(kk)&chr(39),"''","','")
kk=kk+1
wend
end function
id2 ="aa,bb,cc,dd,ee"
'用法输出id2
response.write mysplit(id2)
%>
'*****************
'函数:mysplit
'参数:str
'用法:把aa,bb,cc这样的一个字符串,用","分开,变成每一个两边加上"'"
'说明:chr(39),是"'"的值
'*****************
function Mysplit(str)
if isnull(str) then
str=""
end if
Str = Split(Str,",")
while kk=<ubound(Str)
Mysplit=replace(Mysplit&chr(39)&Str(kk)&chr(39),"''","','")
kk=kk+1
wend
end function
id2 ="aa,bb,cc,dd,ee"
'用法输出id2
response.write mysplit(id2)
%>
呵呵,发一个
毕业了 快过年了
