Re: Re: Rewriting string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Admin wrote:
$categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials');
If(in_array($_GET['page'], $categories))
{
echo '<li><a href=index.php?page='.$_GET['page'].'>'.str_replace("_"," ",$_GET['page']).'</a></li>';
}else{
echo '<li>'.str_replace("_"," ",$_GET['page']).'</li>';
}

I normally never write someones code for them but you are just not getting it.
The above code works use it.

i assume you're joking - that code is simply going to give 6 list items all with the same value - $_GET['page']

please do check you know what you're talking about before you post.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux