Question 52Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

Which of the following PHP functions is used to sort an array in ascending order without

Which of the following PHP functions is used to sort an array in ascending order without affecting the keys?
  1. Aksort()
  2. Barray_sort()
  3. Casort()
  4. Dsort()
Show answerHide answer

Correct answer: (C) asort()

Explanation

asort() sorts an array by value in ascending order while keeping each key associated with its value. sort() re-indexes the keys, and ksort() sorts by key.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

This is question 52 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.