Home » PHP » PHP Arrays » Question
  1. What will be the output of the following PHP code?
    <?php
    $Profile = array("Ajit"=>"22", "Ats"=>"23", "Aju"=>"24");
    print_r(array_change_key_case($Profile, CASE_UPPER));
    ?>
    1. Array
      (
      [AJIT] => 22
      [ATS] => 23
      [AJU] => 24
      )
    2. Array
      (
      [AJIT] => 22
      [ATS] => 23
      )
    3. Array
      (
      [AJIT] => 22
      )
    4. Array
      (
      [AJU] => 24
      )
    5. None of these
Correct Option: A

The array_change_key_case() function changes all keys in an array to lowercase or uppercase.



Your comments will be displayed only after manual approval.