Defintion :
In PHP Array Functions The next()
function moves the internal pointer of an array to the next element, and returns its value.
The basic syntax of the next()
function is given with:
next(array);
The next()
function accepts the following parameters.
Parameter | Description |
---|---|
array | Required. Specifies the array to work on. |
The next()
function is commonly used along with the following functions:
Related methods:
Example : Below example Output the value of the current and the next element in the array:
Output :
Web
Designing