Php array function sequence end ()-move the internal pointer of the array to the last element and return the value of this element. Define and use the end () function to point the internal pointer of the array to the last element, and return the value of this element (if successful ). The end (array) parameter description array is required. Definition and usage
The end () function points the internal pointer of the array to the last element and returns the value (if successful) of the element ).
Syntax
End (array) parameter description
Array is required. Specifies the array to be used.
Example
The code is as follows:
$ People = array ("Peter", "Joe", "Glenn", "Cleveland ");
Echo current ($ people )."
";
Echo end ($ people );
?>
Output:
Peter
Cleveland
The else end () function points the internal pointer of the array to the last element and returns the value of this element (if successful ). The end (array) parameter description array is required. Rules to use...