How can I output this dynamically into a table ?
I have a master table that contains state, then cities for each state.
I want to output each state into its own <td> and then right underneath each state, disply the cites for that state with a checkbox.
I currently do this using separate queries for each state and plug into the <td> :
<td class="TitleText" valign="top" rowspan="2"><b>New Jersey</b><br>
<cfloop query="qryName>
<cfif qryName.state is "New Jersey">
<cfoutput>
<cfinput type="checkbox" name="city" value="#qryName.city#">#qryName.city#<br>
</cfoutput>
</cfif>
</cfloop>
</td>
So if I have five states, I do this five times, one for each state, to put into the <td>
How can I do this dynamically so that I just have one query and it will know when to switch and put each state and city checkbox into its own cell ?