ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

What will be the output of the following PHP code?
<?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.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.