答案:<%
'******************************
'函数:MoveR(Rstr)
'参数:Rstr,以逗号做分隔的数组
'作者:阿里西西
'日期:2007/7/13
'描述:去除数组中重复的项
'示例:<%MoveR("abc,abc,dge,gcg,dge,dgi,die,dir,fgk,dir,gis,sgier,ssir")%>
'******************************
Function MoveR(Rstr)
Dim i,SpStr
SpStr = Split(Rstr,",")
For i = 0 To Ubound(Spstr)
If I = 0 then
MoveR = MoveR & SpStr(i) & ","
Else
If instr(MoveR,SpStr(i))=0 and i=Ubound(Spstr) Then
MoveR = MoveR & SpStr(i)
Elseif instr(MoveR,SpStr(i))=0 Then
MoveR = MoveR & SpStr(i) & ","
End If
End If
Next
End Function
%>
上一个:asp下实现 重新排序数字数组的代码
下一个:asp重定向页面的方法总结