Hello everyone, I'm trying to loop link in my pagination template view, I want to be able to check various condition with the counter,
for example:
PHP Code:
<?php for($i = 1; $i <= count($pager->links()); $i++): ?>
<li style="padding:5px"><?= $pager->links()['title'][$i] ?></li>
<?php endfor; ?>
But I want to be able to uset array items within $pager->links(), uri, title est. Like when It used with foreach like this
PHP Code:
<?php foreach ($pager->links() as $link) : ?>
<li <?= $link['active'] ? 'class="active"' : '' ?>><a href="<?= $link['uri'] ?>" ?>"><?= $link['title'] ?></a></li>
<?php endforeach ?>
How this can be done with for loop?
Thank you in advance!