Saturday, 16 February 2013

How to declare an array in ASP


Program:
<!DOCTYPE html>
<html>
<body>

<%
Dim famname(5),i
famname(0) = "Asif"
famname(1) = "Siaf"
famname(2) = "Sohel"
famname(3) = "Jagjit"
famname(4) = "Jayanta"
famname(5) = "Sujan"

For i = 0 to 5
      response.write(famname(i) & "<br>")
Next
%>

</body>
</html>

Output:
Asif
Siaf
Sohel
Jagjit
Jayanta
Sujan

Thanks for watching...comment it...

No comments:

Post a Comment