使用asp对数组里的内容进行去除重复的动作,分别取出比对:
Function MoveR(Rstrall)
Dim SpStr_i,SpStrall
SpStrall = Split(Rstrall,",")
For SpStr_i = 0 To Ubound(SpStrall)
If SpStr_i = 0 then
MoveR = MoveR & SpStrall(SpStr_i) & ","
Else
If instr(MoveR,SpStrall(SpStr_i))=0 and SpStr_i=Ubound(SpStrall) Then
MoveR = MoveR & SpStrall(SpStr_i)
Elseif instr(MoveR,SpStrall(SpStr_i))=0 Then
MoveR = MoveR & SpStrall(SpStr_i) & ","
End If
End If
Next
End Function
以上的操作主要使后台存储数据的唯一性。