
theclicklab
User
Dec 4, 2011, 10:45 AM
Post #1 of 4
(756 views)
Shortcut
|
|
Testing for last item in loop
|
Can't Post
|
|
Hi there, I need to test for the last item in a navbar so i can remove the separator " | ", could not find it in the forum. Here is the code:
<?php // load records list($pagesRecords, $pagesMetaData) = getRecords(array( 'tableName' => 'pages', 'loadUploads' => '0', 'allowSearch' => '0', 'where' => 'footer_nav ="1"', 'useSeoUrls' => true, )); ?>
<?php foreach ($pagesRecords as $record): ?> <a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?> </a> | <?php endforeach ?> Many thanks ~~~~~~~~~~~~~~~~~~ Jan Dunlop theClickLab.com nz.linkedin.com/in/jandunlop ~~~~~~~~~~~~~~~~~~
|