<!-- bootstrap4 頁籤 --> <nav> <div class="nav nav-tabs" id="nav-tab" role="tablist"> <? for(i in kind){ ?> <a class="nav-item nav-link <? if(i==0){ ?>active<? } ?>" id="nav-<?= i ?>-tab" data-toggle="tab" href="#nav-<?= i ?>" role="tab" aria-controls="nav-<?= i ?>" aria-selected="true"><?= kind[i] ?></a> <? } ?> </div> </nav> <div class="tab-content" id="nav-tabContent"> <? for(i in kind){ ?> <div class="tab-pane fade show <? if(i==0){ ?>active<? } ?>" id="nav-<?= i ?>" role="tabpanel" aria-labelledby="nav-<?= i ?>-tab"><?= kind[i] ?></div> <? } ?> </div> <!-- bootstrap4 頁籤 end -->