Which predefined PHP function can be used to reverse the order of the elements in an array?

  • array_reverse()
  • array_flip()
  • array_rotate()
  • array_shuffle()
The array_reverse() function is used to reverse the order of elements in an array. array_flip() flips the keys and values, while array_rotate() and array_shuffle() are not valid functions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *