<tr>
メイン カテゴリのすべての最後にクラスを追加したいと考えています。クラス名をすべてに追加したくありません<tr>
。スクリプトで何を変更できますか?
このような:
<table>
<tr>
<th></th>
</tr>
<tr>
<td></td>
</tr>
<tr class="test">
<td></td>
</tr>
<th></th>
<tr>
<td></td>
</tr>
<tr class="test">
<td></td>
</tr>
</table>
<table class="data forum">
<? foreach ($this->mainCategories as $mainCategory): ?>
<tr>
<th><strong><?= $this->escape($mainCategory->fcName) ?></strong></th>
<th> </th>
<th><strong>Topics</strong></th>
<th><strong>Laatste topic</strong></th>
</tr>
<? foreach ($mainCategory->getSubCategories() as $category): ?>
<tr>
<td><a href="<?= $this->url(array('categoryid' => $this->escape($category->getID()), 'controller' => 'forum', 'action' => 'subcategory'), 'default', true) ?>"><?= $this->escape($category->getName()) ?></a></td>
<td><?= $this->escape($category->fcDescription) ?></td>
<? if ($this->escape($category->numTopics) > 0): ?>
<td><?= $this->escape($category->numTopics) ?></td>
<td><?= date_create($this->escape($category->last_topic))->format('d-m-Y H:i') ?></td>
<? else: ?>
<td> </td>
<td> </td>
<? endif ?>
</tr>
<? endforeach ?>
<tr>
<td class="split"></td>
</tr>
<? endforeach ?>
</table>