PHP prev() Function

The prev() function moves the internal pointer to, and outputs, the previous element in the array.prev — Rewind the internal array pointerRewind the internal array pointer. prev() behaves just like next(), except it rewinds the internal array pointer one place instead of advancing it.Returns the array value in the previous place that's pointed to by the internal array pointer, or FALSE if there are no more elements.

Example -