Php uses the end () function to access the last element of the array. Php Function end () usage for accessing the last element of the array This article mainly introduces the function end () usage for accessing the last element of the array by php, this example analyzes the Function end () usage of the php end function to access the array element php to access the last element of the array
This article mainly introduces the end () usage of the function for php to access the last element of the array. The example analyzes the skills of the end function in php to access the array elements, which is very useful, for more information, see
This example describes how to use the end () function of php to access the last element of the array. Share it with you for your reference. The specific analysis is as follows:
The end () function is used in PHP to retrieve the last element in the array. The end () function requires an array as its unique parameter and returns the element value of the last element of the given array.
?
1 2 |
$ Users = array ("baidu.com", "haosou.com", "sina.com", "jb51.net "); Print end ($ users ); |
The above code returns: jb51.net
I hope this article will help you with php programming.
Usage () This article mainly introduces the Function end () usage of the last element of the php access array. The example analyzes the elements of the end function access array in php...