본문 바로가기
PHP

210527 html 테이블 php for 문 으로 여러줄 나타내기

by sj0020 2021. 5. 27.
<table  id="example2" class="table table-bordered table-striped">
                      <thead>
                        <tr>
                          <td>제품명</td>
                          <td>구분</td>
                          <td>규격</td>
                        </tr>
                      </thead>
                      <tbody>
                        <?php
                        for ($i=0; $i <5 ; $i++) {
                          ?>
                          <tr>
                            <td>a</td>
                            <td>a</td>
                            <td>a</td>
                          </tr>

                        <?php } ?>
                      </tbody>
                    </table>