I need help looping through my data and outputting it into multiple columns. Currently, it displays vertically right under the next set of data in the array. Please help.
<cfloop array="#UserAddresses#" index="UA">
<tr>
<td>City: </td>
<td><cfif NOT Len(#UA.city.xmlText#)>N/A<cfelse><cfoutput>#UA.city.xmlText#</cfoutput></cfif></td>
</tr>
<tr>
<td>State: </td>
<td><cfif NOT Len(#UA.state.xmlText#)>N/A<cfelse><cfoutput>#UA.state.xmlText#</cfoutput></cfif></td>
</tr>
<tr>
<td>Zip Code: </td>
<td><cfif NOT Len(#UA.zipcode.xmlText#)>N/A<cfelse><cfoutput>#UA.zipcode.xmlText#</cfoutput></cfif></td>
</tr>
</cfloop>
</cfif>
You want the City, State and Zip Code to be headers? Then this would work
It works because
<tr></tr>defines a table row and<td></td>defines a cell in that row. In your case, you were doing multiple rows without cells, thus you were getting your content in a column, instead of a row. A side note is that<cfoutput></cfoutput>should be used only once per page and not around every variable.