What will be the output of the following PHP code? [code] <?php $age = array("Harry" => "21", "Ron" => "19", "Malfoy" => "23"); ksort($age); for

What will be the output of the following PHP code?
Code:
<?php
$age = array("Harry" => "21", "Ron" => "19", "Malfoy" => "23");
ksort($age);
foreach($age as $x => $x_value)
{
    echo "Key=" . $x . ", Value=" . $x_value;
    echo "<br>";
}
?>
A.
Key = Harry, Value = 21
Key = Ron, Value = 21
Key = Malfoy, Value = 23
B.
Key = Harry, Value = 21
Key = Ron, Value = 19
Key = Malfoy, Value = 23
C.
Key = Harry, Value = 21
Key = Malfoy, Value = 23
Key = Ron, Value = 19
D.
Key = Ron, Value = 19
Key = Harry, Value = 21
Key = Malfoy, Value = 23
 

Tìm kiếm

Back
Top