PHP array_change_key_case () function

PHP array_change_key_case() function  is used  to change keys contained in array from one case to another i.e from Lowercase  to uppercase or from Uppercase to lowercase.

Below examples shows how to change keys to uppercase


PHP array_change_key_case function




Array-The function requireds array defined and assinged variables.

Case-there are only two possible values i.e CASE_LOWER-its always the default value of keys.changes keys to lowercase from uppercase

CASE_UPPER-changes the keys to uppercase from lowercase.

Below examples changes keys from uppercase to lowercase


If there are two keys that will be equal after running array_change_key_case() function, eg (d and D),the array will override the other.


See Complete  Array Functions :PHP Array Functions

About the Author: Eric K

Kenyan Developer and Blogger with Interests in Java,Javascript,Node.js, Wordpress, Android, PHP and Making Money Online. Solving world problems through programming is my passion. Hire me: Email :