I have problems with my abc loop. I compare 2 loops, if strings are matching I embed between hyperlink but how would I would avoid to do not show the looped items twice.
<?php
foreach($this->data->lexikon_index() as $index){
foreach ($abc as $letter){
echo '<li>';
if ( $index->alpha == $letter ){
echo "<a href=\"#{$index->alpha}\">{$index->alpha}</a>";
} else {
echo $letter;
}
echo '</li>';
}
$lexikon_content[] = $this->data->lexikon_content($index->alpha);
}
echo '</ul>';
?>