search
Homephp教程php手册php访问数组最后一个元素的函数end()用法

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

Jun 13, 2016 am 09:11 AM
endphpelementfunctionarrayat lastuseusageofaccess

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

 这篇文章主要介绍了php访问数组最后一个元素的函数end()用法,实例分析了php中end函数访问数组元素的技巧,非常具有实用价值,需要的朋友可以参考下

 

 

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

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

?

1

2

$users = array ("baidu.com", "haosou.com", "sina.com", "jb51.net");

print end($users);

上面的代码返回:jb51.net

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

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment