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.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
<div class="g-display-tags-block">
|
<div class="g-display-tags-block">
|
||||||
<? for ($counter=0; $counter<count($tags); $counter++) { ?>
|
<? $not_first = 0; ?>
|
||||||
<? if ($counter < count($tags)-1) { ?>
|
<? foreach ($tags as $tag): ?>
|
||||||
<a href="<?= url::site("tags/$tags[$counter]") ?>"><?= html::clean($tags[$counter]->name) ?></a>,
|
<?= ($not_first++) ? "," : "" ?>
|
||||||
<? } else {?>
|
<a href="<?= url::site("tags/{$tag->name}") ?>"><?= html::clean($tag->name) ?></a>
|
||||||
<a href="<?= url::site("tags/$tags[$counter]") ?>"><?= html::clean($tags[$counter]->name) ?></a>
|
<? endforeach ?>
|
||||||
<? } ?>
|
|
||||||
<? } ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user