php访问数组最后一个元素的函数end()用法,数组end_PHP教程

WBOY
Release: 2016-07-13 10:02:59
Original
950 people have browsed it

php访问数组最后一个元素的函数end()用法,数组end

本文实例讲述了php访问数组最后一个元素的函数end()用法。分享给大家供大家参考。具体分析如下:

end()函数在PHP中用于检索数组中的最后一个元素。end()函数需要一个数组作为其唯一参数,并返回给定数组最后一个元素的元素值。

$users = array ("baidu.com", "haosou.com", "sina.com", "jb51.net");
print end($users);
Copy after login

上面的代码返回:jb51.net

希望本文所述对大家的php程序设计有所帮助。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/969482.htmlTechArticlephp访问数组最后一个元素的函数end()用法,数组end 本文实例讲述了php访问数组最后一个元素的函数end()用法。分享给大家供大家参考。具体...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!