Php retrieves the last element of the array
Php is used to obtain the last element of the array. Use the php built-in function end ().
The end () function points the internal pointer of the array to the last element and returns the value (if successful) of the element ). For example:
$ Args = Array ('www ', 'phpernote', 'com'); echo end ($ args); // comArticles you may be interested in
- Js gets the last element of the array
- How does php Delete the first and last elements of an array?
- Php clears the null element in the array.
- Php method for obtaining the first array unit value of an array
- Php searches for the existence of a value in the array (in_array (), array_search (), array_key_exists ())
- PHP checks whether two arrays have an intersection
- Php converts a multi-dimensional array to a one-dimensional array
- Performance Comparison of using in_array () foreach array_search () to find whether an array contains