Operation of array pointer: operation of moving array pointer: Next () & amp; nbsp; down & amp; nbsp; the value of the current element is also obtained. Prev () & amp; nbsp; the value of the current element is obtained at the same time. End () & amp; nbsp; move to the last element Unit & amp; nbsp; get the value of the last element Reset () & amp; nbsp; move to the first unit & amp; obtain the value of the first element. If the operation fails, false is returned. Parameters are all arrays to be operated and are passed as references. & Amp; nbsp; get the array pointer operation: move the array pointer operation: Next () down and get the value of the current element. The value of the current element is obtained when Prev () is up. Move End () to the last element unit to get the value of the last element. move Reset () to the first unit to get the value of the first element. If the operation fails, false is returned. Parameters are all arrays to be operated and are passed as references. Obtain the information of the element pointed to by the pointer: Key (); // Obtain the element subscript Current () pointed to by the Current array pointer (); // Obtain the elements pointed to by the current array pointer. only the data is retrieved without moving the pointer. There is also a hybrid operation: you can obtain the information (key value) of the current pointer element and move the pointer at the same time. Each (); obtains information about the current element (key and value. Moving pointer: sometimes we can use the features of each to achieve
1. recommended php array pointer effects
Introduction: The array_splice () function is similar to the array_slice () function. it selects a series of elements in the array but does not return them. Instead, it deletes them and replaces them with other values.
[Related Q & A recommendations ]:
What is the difference between $ arr [0] and $ arr ['0?
Converting a php array to a string
If php_encode is used in the PHP array and JSON. parse is used to convert it into a js object, an error is returned (the previous value in the array is a json string)
PHP array conversion
How to write a PHP array formatted into a file
The above is a summary of the definitions and usage of php array functions. For more information, see other related articles in the first PHP community!