Last active
August 29, 2015 14:18
-
-
Save vikaszeon/1013910b1bdb925dd708 to your computer and use it in GitHub Desktop.
Handle case insensitive parameter in php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using php function array_change_key_case() we can handle case insensitive parameter in php. | |
$params = array_change_key_case($_POST or $_GET); | |
Like your parameter in get request someurl.php?AC=user_info&User=vikas&passWord=123456 | |
so after user array_change_key_case function you get all parametre either in small case or uppar case. if you want in uppar case we need to pass in fucntion ssecond parameter. | |
lowercase is by default. | |
array_change_key_case($_POST or $_GET , CASE_UPPER); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment