ASP中如何给N个变量循环赋值?(ASP数组)
<% dim i dim MyArray(100) '定义100的数组 Set rspic = Server.CreateObject("ADODB.Recordset") sqlpic="select * from pictop" rspic.open sqlpic,conn,1,3 i=0 do while not rspic.eof i=i+1 MyArray(i)=rspic("files")'循环取值 response.Write(""&MyArray(i)&"<br />") rspic.movenext loop rspic.close set rspic=nothing %>
|