|
Posted by the DtTvB on 06/14/06 14:43
Here is my method.
<?php
$allpages = array(
'home' => 'Home Page',
'purpose' => 'Purpose',
'spiritgifts' => 'Spiritual Gifts',
'potential' => 'Reaching Potential',
'weightloss' => 'Weight Loss',
'gifts2' => 'Spiritual Gifts 2',
'gifts3' => 'Spiritual Gifts 3',
'links' => 'Links',
'plan' => 'The Plan',
'plan2' => 'The Plan',
'plan3' => 'The Plan'
);
// Make an associative array by use its key as page name.
if (!isset($allpages[$thispage = $_GET['page']]))
$thispage = 'home';
// If the requested page does not exists, just show the home!
$title = $allpages[$thispage];
// Get its title.
echo "<h1>$title</h1>";
// Display its title to test.
?>
Navigation:
[Reply to this message]
|