Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | PHP Quiz | Set-3 | Question 13

  • Last Updated : 20 Sep, 2021

Which of below functions is used to sort an array according to its value?
(A) unshift()
(B) asort()
(C) arsort()
(D) compact()

Answer: (B)

Explanation: The asort() function is an inbuilt function in PHP that is used to sort the array according to its values. This function sorts the array in which manner that the indices and value will be maintained. It sorts in ascending order of values. It take two-parameter $array and $sorting_type.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!