The following is a brief introduction to the php array array_change_key_case () and array_chunk () functions. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at it with Xiaobian.
As follows:
'Java', 'B' => 'php', 'C' => 'c ++ ', 'D' => 'c #'); print_r (array_change_key_case ($ input_array, CASE_LOWER); print_r (array_change_key_case ($ input_array, CASE_UPPER); // if two or more keys are the same when running the function, the final element will overwrite other elements, for example, $ input_array = array ('a' => 'barri', 'B' => 'Madrid ', 'C' => 'Manchester ',' B '=> 'milance'); print_r (array_change_key_case ($ input_array, CASE_LOWER);?>
Running result:
'Java', 'B'=>'Php', 'C'=>'C++', 'D'=>'C#'); print_r(array_chunk($input_array, 2 ,false)); print_r(array_chunk($input_array, 3 ,true)); ?>
Running result:
The above is a brief introduction to the php array array_change_key_case () function and the array_chunk () function. I hope you can support the array_chunk function ~