Reply to Re: Case Sensitive, Case Sensitivity, $_GET

Your name:

Reply:


Posted by Jim Carlock on 03/09/06 22:15

Jim Carlock asked:
> $_GET['city'] displays behaves like a stubborn mule and refuses
> to get the get and returns empty ("").
>
> Is there a way to turn off the case sensitivity ?
>


"Janwillem Borleffs" <jw@jwscripts.com> suggested:
> As an alternative to juglesh's suggestion, you could also change
> the case of all keys of the $_GET array to lowercase using the
> array_change_key_case() function:
>
> $lc = array_change_key_case($_GET);
> $city = $lc['city'];
>
> Especially useful if there are more values to grab from the
> $_GET array.

Thanks, once again, Janwillem.

Going along and employing $lc, if I want to check and see if
anything exists inside the $lc array, what's the best way to do
this? Is there something that returns a TRUE or FALSE and
tells me $_GET holds stuff?

if (count($lc) != 0) {
// nothing set so show the full list
$ShowAllMenus = TRUE;
} else {
// something is set so start grabbing!
$LookAtGet = TRUE;
}

- OR -

if (isset($lc)) {
// something is set so start grabbing!
$LookAtGet = TRUE;
} else {
// nothing set so show the full list
$ShowAllMenus = TRUE;
}

- OR -

if ($lc == NULL) {
// nothing set so show the full list
$ShowAllMenus = TRUE;
} else {
// something is set so start grabbing!
$LookAtGet = TRUE;
}

Thanks, much.

Jim Carlock
Post replies to the group.

[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

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