[eluser]georgerobbo[/eluser]
Is there a more efficient way to do a basic menu than below.
Code:
<div id="menu">
<ul>
<li><a href="<?=base_url()?>">Home</a></li>
<li><a href="<?=site_url()?>/focus">Focus</a></li>
<li><a href="<?=site_url()?>/projects">Projects</a></li>
<li><a href="<?=site_url()?>/resources">Resources</a></li>
<li><a href="<?=site_url()?>/updates">Updates</a></li>
<li><a href="<?=site_url()?>/about">About</a></li>
</ul>
</div>
I was thinking of using an array and creating a loop, but in PHP you can't use foreach twice so how would I create the loop from two arrays containing the links and the names? *I'm a beginner to PHP and MVC.