php获取数组最后一个元素的方法
我们可以使用php内置函数end()。end() 函数将数组内部指针指向最后一个元素,并返回该元素的值(如果成功)。
例如:
$args=Array('www','scutephp','com');<br />echo end($args);//com
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