Operation of Array pointers:
To move an array pointer operation:
Next () will also get the value of the current element down.
Prev () will also get the value of the current element.
End () moves to the last element cell to get the value of the last element
Reset () moves to the first cell to get the value of the first element.
returns False if the move is unsuccessful .
Parameters are arrays that require manipulation, and are reference passes.
Gets the information for the element pointed to by the pointer:
Key ();//Gets the element subscript that the current array pointer points to
Current ();//Gets the element pointed to by an array pointer
get data only do not move pointer
There is also a mixed operation:
that is, you can get information about the current pointer element (the key value) or you can move the pointer at the same time.
each (); Gets information about the current element (key and value information),
A.
Move the pointer:
we can sometimes use each of the features to achieve the purpose of iterating over an array:
The loop structure should be used with each completion.
mate Condition:when each is to the last element, it returns false.
List function:
List restriction: only works on indexed arrays.
using list and each to complete the traversal
but using the play each traversal after the array pointer is not reset resets the reset and needs to be reset manually.
Operation of Array pointers:
To move an array pointer operation:
Next () will also get the value of the current element down.
Prev () will also get the value of the current element.
End () moves to the last element cell to get the value of the last element
Reset () moves to the first cell to get the value of the first element.
returns False if the move is unsuccessful .
Parameters are arrays that require manipulation, and are reference passes.
Gets the information for the element pointed to by the pointer:
Key ();//Gets the element subscript that the current array pointer points to
Current ();//Gets the element pointed to by an array pointer
get data only do not move pointer
There is also a mixed operation:
that is, you can get information about the current pointer element (the key value) or you can move the pointer at the same time.
each (); Gets information about the current element (key and value information),
A.
Move the pointer:
we can sometimes use each of the features to achieve the purpose of iterating over an array:
The loop structure should be used with each completion.
mate Condition:when each is to the last element, it returns false.
List function:
List restriction: only works on indexed arrays.
using list and each to complete the traversal
but using the play each traversal after the array pointer is not reset resets the reset and needs to be reset manually.
PHP Array Pointers