Don't treat objects like strings. Simplify the code.
This commit is contained in:
parent
30ab3e9420
commit
9a1fc57211
@ -1,10 +1,8 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<div class="g-display-tags-block">
|
||||
<? for ($counter=0; $counter<count($tags); $counter++) { ?>
|
||||
<? if ($counter < count($tags)-1) { ?>
|
||||
<a href="<?= url::site("tags/$tags[$counter]") ?>"><?= html::clean($tags[$counter]->name) ?></a>,
|
||||
<? } else {?>
|
||||
<a href="<?= url::site("tags/$tags[$counter]") ?>"><?= html::clean($tags[$counter]->name) ?></a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<? $not_first = 0; ?>
|
||||
<? foreach ($tags as $tag): ?>
|
||||
<?= ($not_first++) ? "," : "" ?>
|
||||
<a href="<?= url::site("tags/{$tag->name}") ?>"><?= html::clean($tag->name) ?></a>
|
||||
<? endforeach ?>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user