ADD A HORIZONTAL LINE TO SEPARATE LETTER GROUPS IN A LIST - Aug 2nd, 2010


Rconring wanted to know how to add an <hr> between the letter groups in an alphabetized list of links. Ross Fairbairn -
Product Specialist at Interactive tools had the solution. He said, Just add the indicated code to your page and you’re
good to go.



<?php foreach ($linksRecords as $record): ?>
<a target="_blank" title="<?php echo $record['screen_tip'] ?>"
href="<?php echo $record['web_address'] ?>"><?php echo $record['title'] ?></a><br />
<!-- Insert This Code -->
<?php
$letter = substr($record['title'], 0,1);
if (
$letter != @$lastLetter) { print '<hr width="50%" size="1">'; }
$lastLetter = $letter;
?>
<!-- End of Insert-->
<?php endforeach ?>




The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service