|
|
Changes all key case in an array in php - PHP
|
Views : 275
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
We can change array key values either to lower or upper case using array_change_key_case() function
<?php
$input_array = array("FirSt" => 1, "SecOnd" => 4);
print_r(array_change_key_case($input_array, CASE_UPPER));
?>
Result:
Array
(
[FIRST] => 1
[SECOND] => 4
)
|
|
By - kalai, On - 2009-11-07 |
|
|
|