Definition :
In PHP Array funciton PHP prev is an inbuilt function in PHP. prev() function is used to moves the internal pointer to, and outputs, the previous element in the array.
Related methods:
prev(array)
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Example1 : In this given below example Output the value of the current, next and previous element in the array:
:
Ouput :
Web
Desinging
Web
Example2 : A demonstration of all related methods
Output :
Apple
Mango
Mango
Apple
Banana
Apple