Hi -- I think this may be a fairly basic question, but I can't figure it out:
I want to check whether a querystring parm exists:
$_GET["somevar"]
but I want this check to be case insensitive (so SoMeVaR would get caught too.)
thanks very much.
Hi,
as of php 4.2.0 you can use array_change_key_case() to do that.
Example:
$arrGet = $_GET; // convert keys to lower case (default) $arrGet = array_change_key_case($arrGet); if (isset($arrGet['somevar'])) { echo "key/param exists"; }
Read more about this in the manual.
Thomas
awesome. thank you.