Click to See Complete Forum and Search --> : php menu


piertiong
08-03-2003, 03:20 AM
hi there

for those websites with menu and links to example index.php?content=examples

do they use switch case? or if loops?

i am using switch case and was thinking it will get very long if i have alot of links?

pyro
08-03-2003, 09:54 AM
I would think that generally speaking, if you are going to be working with quite a few links, you would use the switch conditional.

Bootsman123
08-03-2003, 01:17 PM
(Example: index.php?tag=index)
The way I did it:

$tag_array = array ("index");

You check if $tag is in the array and after that you include the page:

$link = $tag . ".php";
include ($link);