|
Posted by alanbe on 06/14/06 17:17
DtTvB
I tried this and it works!
Thanks alot DtTvB and everyone else who replied..
alanbe
the DtTvB wrote:
> 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.
> ?>
[Back to original message]
|