PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<eachextract>
Last updated: Mon, 16 Jul 2012

end

(PHP 3, PHP 4, PHP 5)

end --  将数组的内部指针指向最后一个单元

说明

mixed end ( array array )

end()array 的内部指针移动到最后一个单元,并返回该单元的值。

例子 1. 简单的 end() 例子

<?php

  $fruits
= array('apple','banana','cranberry');

  print
end($fruits); // cranberry

?>

参见 current()each()next()reset()




<eachextract>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST