#Generate html in loop

6 messages · Page 1 of 1 (latest)

native crystal
#

What is my desired way to show a table that generates rows and column in loops?

I want to do something like

for row < 100, row++{
  <tr>
  for column < 100, column++{
    <td>CONTENT</td>
  }
  </tr>
}
sand holly
#

My preferred way would be to generate the data outside the return and use the value using a map to show the result.

native crystal
#

ye, that is what I am doing now

sand holly
#

Then what's the issue?

native crystal
#

I wanted to avoid doing that

#

asot, I found the map way before posting here, but I wanted to know alternatives