1. Home
  2. Computer Science MCQs
  3. PHP
  4. Which function can be used to move the pointer to the…

Added 19 Jan 2024

Which function can be used to move the pointer to the previous array position?

  1. last()
  2. before()
  3. prev() Correct answer
  4. previous()

Correct answer

C. prev()

10 views

MCQSEXAM

Explanation

prev() moves an array's internal pointer back one position and returns the element found there, or false if there are no more elements. It belongs to the same family as current(), next(), reset() and end().

last(), before() and previous() are not PHP functions, which makes them easy distractors to eliminate.

Keep preparing with more Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs