markup help

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 26, 2012   (RSS)

Hi

I have this piece of code

<?php foreach ($contact_usRecords as $listRecord): ?>
<?php $isSelected = ($listRecord['num'] == $detailRecord['num']); ?>
<?php if ($isSelected) { print "<b>"; } ?>
<li><a href="<?php echo htmlencode($listRecord['_link']) ?>"><?php echo htmlencode($listRecord['state_code']) ?></a></li>
<?php if ($isSelected) { print "</b>"; } ?>
<?php endforeach ?>
<?php if (!$contact_usRecords): ?>
<?php endif ?>

at the moment it bolds the selected item but i want it to not bold the selected item but to set the class on the <li> to class="active" how can i do that?
Thanks



Craig

KC Media Solutions

www.kcmedia.biz