Created
May 1, 2012 12:04
-
-
Save johnschimmel/2567587 to your computer and use it in GitHub Desktop.
Nested for loop example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Loop through each state, 's' is the incrementer value --> | |
<% for(s=0;s< states.length; s++) %> | |
<h4><%=states[s].toUpperCase()%></h4> | |
<UL> | |
<!-- Loop through allLegs for the current state, state[s] --> | |
<% for(i=0; i<allLegs[states[s]].length; i++) {%> | |
<li><%= allLegs[states[s]][i].title %></li> | |
<% } %> <!-- end of allLegs inner loop --> | |
</UL> | |
<% } %> <!-- end of state loop --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment