This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Arrays

array_change_key_case() Function

Array ( [A] => Cat [B] => Bird [C] => Horse )

<?php
$pets=array("a"=>"Cat","B"=>"Dog","c"=>"Horse","b"=>"Bird");
print_r(array_change_key_case($pets,CASE_UPPER));
?>

When two or more keys will be equal after running array_change_key_case() (e.g. "b" and "B"), the latest array will override the other: