Article From:

First stick to my code

<tr th:each=" title : ${titles}">
            <th th:text="${title}"></th>

titles It’s an array.

The results are as follows

Generated HTML code

                <th>Order < /th>< /tr>< tr>< th> store name < /th>< /tr>< tr>< th> telephone < /th>< /tr>< tr>< th> address < /th>< /tr>

But the effect I want is to want a tr containing 4 th.

    <th>Order < /th>< th> store name < /th>< th> telephone < /th>< th> address < /th>< /tr>

How to do it, please.

Answer 0:

Link of this Article: On the thymeleaf iterative array

Leave a Reply

Your email address will not be published. Required fields are marked *