First of all, think about it? Is it possible to iterate through an array with a for?
Can actually be but, not the real sense of traversal,
for loop traversal, only suitable for index array, because we are to get the array subscript, and then use the subscript to access the elements of the array, but, logically, the subscript is part of the array, must be the first element to get the element subscript!
We are accustomed to using foreach to iterate through an array, because the reason for the foreach nature is that the pointer to the array can be found directly!
In the array of pointers, there is probably a common function: Key current next reset
Key syntax is: Key ( array name )
Function: Gets the key of the current element of the array!
Current syntax is: current ( array name )
Function: Gets the value of the current element of the array!
Next syntax is: Next ( array name )
Function: Moves the pointer of an array down one
Reset syntax is: RESET ( array name )
Function: Resets the pointer to an array (the pointer to the array is re-directed to the first element)
Code Case:
Pointers to arrays