12月25

asp数组典型应用代码实例

| |
08:11 ASP  From: 本站原创
asp数组典型应用代码实例,数组的应用对于提高程序效率,可读性及重用性都用一定的帮助,虽然ASP已经黯淡下来,以.NET,PHP为主导,但很多站还是ASP环境,顺便说句,学.NET赶紧,个人感觉.NET具备明显的优越性!

       <table width="100%">
  <%
  Dim i,j
  Dim sql,sql1
  Dim Array,Array1
  sql1="select id,name from dababase where id=2012 and nane like '%tommmyhu%' order by datetime"
  Array=Sql_Array(sql1)
  if IsArray(Array) then
  For i=0 to Ubound(Array,2)
  response.write ("<tr><td style=""line-height:26px;""><strong style=""color:#f60"">"&Array(1,i)&":</strong>")
  sql="SELECT id1,name1 FROM database1 WHERE id1="&Array(0,i)&" "
  Array1=Sql_Array(sql)
  if IsArray(Array1) then
  For j=0 to Ubound(Array1,2)
  response.write "&nbsp;&nbsp;&nbsp;<a href=""link_"&Array(0,i)&"_"&Array1(2,j)&"_"&Array1(0,j)&"".html"">"&Array1(1,j)&"</a>"
  Next
  End if
  response.write "</td></tr>"
  Next
  End if                   
  %>
         </table>
阅读(4075) | 评论(0) | 引用(0)
在此留下酱油瓶-:)
表情
emotemotemotemotemotemotemotemotemotemotemotemotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我

您的大名(例如:小明) : 

密码(可不填) :  游客无需密码

网址 (可不填) : 

电邮 (可不填) :  [注册]