need some php help here
i have this for a nav thing
<?php
switch ($page)
{
default :
include \"includes/tops/page.php\";
break;
CASE \"home\":
include \"includes/tops/page.php\";
break;
CASE \"design\":
include \"includes/tops/page2.php\";
break;
CASE \"hosting\":
include \"includes/tops/head3.php\";
break;
CASE \"support\":
include \"includes/tops/page4.php\";
break;
CASE \"contact\":
include \"includes/tops/page5.php\";
break;
CASE \"login\":
include \"includes/tops/page6.php\";
break;
}
?>
but i want to pass a bit more info other than the page switch, mainly page title desc and keywords, to be place in the tags etc..
from a single predifined include...
what's the quickest way of doing so?
THX
VENI VIDI VICI
Suzanne posted this at 20:41 — 15th February 2004.
She has: 5,507 posts
Joined: Feb 2000
You can include more statements in each case. I think the default is supposed to be at the end.
Busy posted this at 22:05 — 15th February 2004.
He has: 6,151 posts
Joined: May 2001
for each CASE have something like
CASE "page name":
$ptitle = "pages name title";
$desc = "pages desc";
$kwords = "key words";
include "filename";
break;
can even have functions etc in there
CASE "science":
if(E=m2c){ take over the world; }
else if (
Mark Hensler posted this at 02:45 — 16th February 2004.
He has: 4,048 posts
Joined: Aug 2000
E=M(C^2)
Energy = Mass * (Speed of light squared)
Abhishek Reddy posted this at 04:49 — 16th February 2004.
He has: 3,348 posts
Joined: Jul 2001
But really:
E = [gamma] m_0 (c^2) = (m_0 (c^2)) / sq_root(1 - (v^2)/(c^2))
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.