ASP/VBScript For Each... Next ใช้ในการแสดงข้อมูล Key และ Value ของตัวแปร Array
Syntax
For Each element In group
[statements] Next
Sample
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim arrData(3)
Dim arr As String
arrData(0) = "a"
arrData(1) = "b"
arrData(2) = "c"
arrData(3) = "d"
For Each arr in arrData
Response.write(arr & "<br>")
Next
End Sub
</script>