Features
      Ask DevGuru
      ASP Resources
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      Tutorials
  Products
      dgCalendar
      dgCharge New!
      dgChart New!
      dgFileUpload
      dgReport New!
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Technologies
      ADO 2.6
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      Transact-SQL Syntax
      VBScript
      WML
      WMLScript
      WSH
      XML DOM

              











STATEMENT:  For Each

Implemented in version 2.0
 
For Each . . . Next
 
The For Each conditional statement repeats a block of code for each element of an array or a collection of data.
 
You can use Exit For statements to exit out of a For Each loop. You can place For Each statements inside of other conditional statements. You must end all For Each statements with Next or you will get an error message.
 
In the example, the variable i will assume the value of each element in the array, one at a time, in order, from the first element in the array up to the last element actually being used.
 
Code:
<%
For Each i in myarray
   Rem You can place all of the code you desire inside a For Each loop
Next
%>


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information