A good website is easy to navigate from one page to the next and an easy to navigate
website will make the following clear to the user:
- Which page he is currently viewing, i.e. where he currently "is" in your
website
- What pages he can view
Furthermore, you want to be able to save time and effort in
coding your website while also ensuring that your site can be easily modified and updated.This is
an ideal situation in which to use PHP server side scripting to dynamically generate the links.
In this post I present code that will generate links grouped under different sub-headings. It will apply a special style to the navigation bar entry for the page that the user is currently viewing.