mixed reset ( array &$array_variable )
reset function does two tasks:
- It moves the array’s internal pointer to the first element in the array.
- Then it returns the element’s value at the new position.
If the array is empty, then false is returned.
- The array to be worked on by
Returns the value of the first element. If the array is empty, then false is returned.
Show It in ActionBasic
In this video, you will see the
reset function in action through various code examples.
Whoever says that coding is hard, just smack them.
In this video, you will go deeper into the instruction. You will also look at the PHP source code.