我也做过循环,可是得到的结果不行,我是这么写的.
session("product_list")是用来存放上一页传过来的ID,session("productlist")是添加到购物车里的产品ID,然后,我想在下面的循环中查找出没被选中的,可就是不行...
if len(session("product_list"))=0 then
session("product_list")=id
else if instr(session("product_list"),""&id&"")<=0 then
session("product_list")=session("product_list") & ","&id&""
end if
end if
product_list=split(session("product_list"),",")
nn=replace(session("productlist"),"'","")
productlist=split(nn,",")
for c=0 to ubound(product_list)
list=list &","&product_list(c)
next
for i=0 to ubound(productlist)
if instr(list,productlist(i))<=0 then
tt=tt&productlist(i)
end if
next