I am trying to make a table with ten values across on each row starting at 1 and going to 100.
My Ruby code looks like this:
<table border="1">
<% (1..100).each do |i|
d3 = (i % 3 == 0)
d5 = (i % 5 == 0)
i = "<b>#{i}</b>" if d5
i = "<i>#{i}</i>" if d3 %>
<tr>
<td><%= i %></td>
</tr>
<% end %>
</table>
How would I put this in an HTML table in a 10 X 10?
Using ERB:
Using Haml:
Basically, you want to start a table row before elements 1, 11, 21, etc. and end a row after elements 10, 20, 30, etc.