end() 函数将数组内部指针指向最后一个元素,并返回该元素的值(如果成功)。
语法
end(array)参数 描述
array 必需。规定要使用的数组。
例子
复制代码 代码如下:
<?php
$people = array("peter", "joe", "glenn", "cleveland");
echo current($people) . "<br />";
echo end($people);
?>
输出:
peter
cleveland
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!