ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

What will be the output of the following PHP code?
<?php
$arr = array ("picture1.JPG", "picture2.jpg", "Picture10.jpg", "picture20.jpg");
sort($arr);
print_r($arr);
?>

Answer & Solution
Correct Answer: Option C
While sorting each character is compared with the others and sorted using ascii values therefore we the sorted array to be like option c.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.