Reply to Re: Problem creating working array value pair

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация