the differnce, case is faster for more things i guess, and eaiser if your gonna have like 10 vars, instead of if then if then if then if then if then.
___________________
i stupended my own signarture
Login |
Tutorial: page.php?page=blah / query strings / easy template tutorial (UPDATED)Tutorial: page.php?page=blah / query strings / easy template tutorial (UPDATED)Currently viewing this thread: 1 (0 members and 1 guests) KungPaoChickenStatus: Offline!
the differnce, case is faster for more things i guess, and eaiser if your gonna have like 10 vars, instead of if then if then if then if then if then. ___________________ i stupended my own signarture So is case the same thing as if or else and break is the same thing as a closing bracket }? I have like 10 sub-navigation links in some of my sub-navigation links. Could somebody give me an example of how I can trim my code down some more instead of having to include the <p class="subnav" ...etc... in each line? How could I do this using the switch statements? Thanks for the help. It is much appreciated. ___________________ Best Regards, John Saunders not_takenStatus: Offline!
I know I probably sound really dumb, but why would I want to do this, why not just have say links.php instead of whatever.php?page=links.
Not really...what are you talking about? ___________________ http://www.philbrodeur.com - Expert PHP Development and Tutorials TrigBoyStatus: Offline!
yeh it could be used for comparing. eg
VectorStatus: Offline!
The primary benefit is ease of changes. With this, each source file contains only the content part of the page while the central one has all the formatting. For example, if you add another page to the listing, you only have to change your nav bar in one place rather than every page with it. For sites that use a nav bar, of course. Another benefit is the centralization of everything. It removes the need to make every file be able to stand-alone. For example, let's say you had the following:
In this method, you would only need those defined in the central file no matter how many others used it. In a stand-alone page layout, each file would need its own copy and would be much harder to change.
___________________
Last edited by Dev1, April 17th, 2003 09:22 AM (Edited 1 times) error ___________________ http://celerondude.com typed it wrong, but you get the idea. |
Copyright ©1999-2008 Neverside. All rights reserved.
Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach
NeverAPI generated this page in 0.0202 seconds.