PHP prev() FunctionLast Updated : 17 Mar 2025 The PHP prev( ) function is used to fetch the array value in the previous place, pointed by the internal array pointer. This function was introduced in PHP 4.0. SyntaxParameter
ReturnsThe prev( ) function returns the value of the previous element in the array on success or false if there are no more elements. Example 1Output: php Java Example 2Output: Java php Java Example 3Output: arctic antarctic arctic Example 4Output: arctic indian arctic arctic Next TopicPhp-array-product-function |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India