Php: Function end () usage for accessing the last element of the array _ PHP Tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.