[Phpwm] Site Structure
David Goodwin
david at codepoets.co.uk
Fri Dec 9 13:43:09 GMT 2005
> Another way of doing this would be a switch statement:
>
> switch ($_GET['page']) {
> case "pictures":
> include ("pictures.php");
> break;
> case "news":
> include ("news.php");
> break;
> default:
> include ("welcome.php");
> }
>
> I think this looks better and is easier to understand when you look
> back at your code.
Interestingly (?) I did actually write something like that to start
with, and then thought it would involve less repetition using an array.
David.
--
David Goodwin
[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk ]
More information about the Phpwm
mailing list