?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$age = array("Harry" => "21", "Ron" => "23","Malfoy" => "21");
array_change_key_case($age, CASE_UPPER);
array_pop($age);
print_r($age);
?>
<?php
$age = array("Harry" => "21", "Ron" => "23","Malfoy" => "21");
array_change_key_case($age, CASE_UPPER);
array_pop($age);
print_r($age);
?>
Answer & Solution
Correct Answer:
Option
C
The array_change_key_case() function changes all keys in an array to lowercase or uppercase and arry_pop() removes last element
Join the Discussion
Login to post a comment or share your explanation.
Login