1
0
mirror of https://github.com/php/doc-zh.git synced 2026-03-26 08:02:16 +01:00
Files
archived-doc-zh/reference/array/functions/current.xml
Dallas Wang 64071f2fba Literal fixes.
git-svn-id: https://svn.php.net/repository/phpdoc/zh/trunk@95699 c90b9560-bf6c-de11-be94-00142212c4b1
2002-09-14 18:51:42 +00:00

56 lines
1.7 KiB
XML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="gb2312"?>
<!-- $Revision: 1.2 $ -->
<!-- $Author: dallas $ -->
<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready -->
<refentry id="function.current">
<refnamediv>
<refname>current</refname>
<refpurpose>返回数组中的当前单元</refpurpose>
</refnamediv>
<refsect1>
<title>说明</title>
<methodsynopsis>
<type>mixed</type><methodname>current</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
</methodsynopsis>
<para>
每个数组中都有一个内部的指针指向它“当前的”单元,初始指向插入到数组中的第一个单元。
</para>
<para>
<function>current</function> 函数返回当前被内部指针指向的数组单元的值,并不移动指针。如果内部指针指向超出了单元列表的末端,<function>current</function>
返回 &false;
<warning>
<para>
如果数组包含有空的单元0 或者 "",空字符串)则本函数在碰到这个单元时也返回
&false;。这使得用 <function>current</function> 不可能判断是否到了此数组列表的末端。要正确遍历可能含有空单元的数组,用
<function>each</function> 函数。
</para>
</warning>
</para>
<para>
参见 <function>end</function><function>next</function><function>prev</function><function>reset</function>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->