?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$fruits = array ("mango", "apple", "peach", "pear");
$fruits = asort ($fruits);
printr ($fruits);
?>
<?php
$fruits = array ("mango", "apple", "peach", "pear");
$fruits = asort ($fruits);
printr ($fruits);
?>
Answer & Solution
Correct Answer:
Option
A
The function asort() sorts the array in ascending order, except that the key/value corresponding is maintained.
Join the Discussion
Login to post a comment or share your explanation.
Login