Definition :
In php Array function reset function is inbuilt function.The reset() function is used to moves the internal pointer to the first element of the array.
Related methods:
reset(array)
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Example1 : Given below example Output the value of the current and next element in an array, then reset the array's internal pointer to the first element in the array
Output :
Web
Desinging
Web
Example2 : A demonstration of all related methods
Output :
Apple
Mango
Mango
Apple
Banana
Apple