输入banner图图片脚本导航/分类

php获取数组最后一个元素的方法

php获取数组最后一个元素的方法

我们可以使用php内置函数end()。end() 函数将数组内部指针指向最后一个元素,并返回该元素的值(如果成功)。

例如:

$args=Array('www','scutephp','com');
echo end($args);//com