gistfile1.php
‘ : ‘>’);
echo ‘‘.$sectionstitle[$i].’‘;
echo ‘
‘;
}
?>
gistfile1.php
<?php
#count all sections and go through each one to create a menu
for ($i = 0; $i < count($sections); $i++) {
echo '<li'.($s == $sections[$i] ? ' class="current_page_item">' : '>');
echo '<a href="/'.$sections[$i].'"><span><strong>'.$sectionstitle[$i].'</strong><span class="navi-description">'.$sectionssubtitle[$i].'</span></span></a>';
echo '<ul class="sub-menu">';
# search through current section to build sub-menu items
$section = $sections[$i];
foreach ($$section as $submenukey => $submenuvalue){
echo '<li><a href="/'.$section.'/'.$submenukey.'"><span>'.$submenuvalue.'</span></a></li>';
}
echo '</ul></li>';
}
?>
No comments yet.