@@ -16,17 +16,9 @@ else:
<th><?= __("Edit Account") ?></th>
</tr>
</thead>
- <?php
- $i = 0;
- foreach ($userinfo as $indx => $row):
- if ($i % 2):
- $c = "even";
- else:
- $c = "odd";
- endif;
- ?>
- <tbody>
- <tr class ="<?= $c ?>">
+ <tbody>
+ <?php foreach ($userinfo as $idx => $row): ?>
+ <tr class ="<?= ($idx % 2 == 0) ? 'odd' : 'even' ?>">
<td><a href="<?= get_uri('/packages/'); ?>?SeB=m&K=<?= $row["Username"] ?>"><?= $row["Username"] ?></a></td>
<td><?= $row["AccountType"] ?></td>
<td>
@@ -49,10 +41,8 @@ else:
<?php endif; ?>
</td>
</tr>
- <?php
- $i++;
- endforeach;
- ?>
+ <?php endforeach; ?>
+ </tbody>
</table>
<table class="results">
Do not add an opening <tbody> tag for every row. Instead, wrap all rows in <tbody></tbody>. While at it, also simplify the code used to color the rows. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- web/template/account_search_results.php | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-)