cvs: phpdoc-zh /reference/array/functions compact.xml current.xml end.xml
| From: | Dallas Thunder | Date: | Thu, 25 Aug 2005 19:42:14 +0000 |
| Subject: | cvs: phpdoc-zh /reference/array/functions compact.xml current.xml end.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-2531@lists.php.net to get a copy of this message | ||
dallas Thu Aug 25 15:42:14 2005 EDT
Modified files:
/phpdoc-zh/reference/array/functions compact.xml current.xml
end.xml
Log:
Updated.
http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/compact.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc-zh/reference/array/functions/compact.xml
diff -u phpdoc-zh/reference/array/functions/compact.xml:1.3
phpdoc-zh/reference/array/functions/compact.xml:1.4
--- phpdoc-zh/reference/array/functions/compact.xml:1.3 Sun Aug 17 01:56:13 2003
+++ phpdoc-zh/reference/array/functions/compact.xml Thu Aug 25 15:42:12 2005
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="gb2312"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- $Author: dallas $ -->
-<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready -->
+<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready -->
<refentry id="function.compact">
<refnamediv>
<refname>compact</refname>
@@ -26,19 +26,29 @@
<function>extract</function>
ÕýºÃÏà·´¡£·µ»Ø½«ËùÓбäÁ¿Ìí¼Ó½øÈ¥ºóµÄÊý×é¡£
</para>
<para>
- ÈκÎûÓÐÉ趨Ϊ±äÁ¿ÃûµÄ×Ö·û´®¶¼±»Ìø¹ý¡£
+ ÈκÎûÓбäÁ¿ÃûÓëÖ®¶ÔÓ¦µÄ×Ö·û´®¶¼±»ÂÔ¹ý¡£
</para>
+ <note>
+ <title>Gotcha</title>
+ <para>
+ ÒòΪ<link
linkend="language.variables.variable">¿É±ä±äÁ¿</link>Ò²Ðí²»ÄÜÔÚº¯ÊýÄÚ²¿ÓÃÓÚ
+ PHP µÄ<link
linkend="language.variables.superglobals">³¬È«¾ÖÊý×é</link>£¬´Ëʱ²»Äܽ«³¬È«¾ÖÊý×é´«µÝÈë
+ <function>compact</function> ÖС£
+ </para>
+ </note>
<para>
<example>
<title><function>compact</function> Àý×Ó</title>
<programlisting role="php">
<![CDATA[
<?php
-$city = "San Francisco";
+$city = "San Francisco";
$state = "CA";
$event = "SIGGRAPH";
-$location_vars = array ("city", "state");
-$result = compact ("event", "nothing_here", $location_vars);
+
+$location_vars = array("city", "state");
+
+$result = compact("event", "nothing_here", $location_vars);
?>
]]>
</programlisting>
http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/current.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc-zh/reference/array/functions/current.xml
diff -u phpdoc-zh/reference/array/functions/current.xml:1.5
phpdoc-zh/reference/array/functions/current.xml:1.6
--- phpdoc-zh/reference/array/functions/current.xml:1.5 Sun Aug 17 01:56:13 2003
+++ phpdoc-zh/reference/array/functions/current.xml Thu Aug 25 15:42:12 2005
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="gb2312"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- $Author: dallas $ -->
-<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready -->
+<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready -->
<refentry id="function.current">
<refnamediv>
<refname>current</refname>
@@ -11,7 +11,7 @@
<title>˵Ã÷</title>
<methodsynopsis>
<type>mixed</type><methodname>current</methodname>
-
<methodparam><type>array</type><parameter>array</parameter></methodparam>
+ <methodparam><type>array</type><parameter
role="reference">array</parameter></methodparam>
</methodsynopsis>
<para>
ÿ¸öÊý×éÖж¼ÓÐÒ»¸öÄÚ²¿µÄÖ¸ÕëÖ¸ÏòËü¡°µ±Ç°µÄ¡±µ¥Ôª£¬³õʼָÏò²åÈëµ½Êý×éÖеĵÚÒ»¸öµ¥Ôª¡£
http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/end.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc-zh/reference/array/functions/end.xml
diff -u phpdoc-zh/reference/array/functions/end.xml:1.3
phpdoc-zh/reference/array/functions/end.xml:1.4
--- phpdoc-zh/reference/array/functions/end.xml:1.3 Sun Aug 17 01:56:13 2003
+++ phpdoc-zh/reference/array/functions/end.xml Thu Aug 25 15:42:13 2005
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="gb2312"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- $Author: dallas $ -->
-<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready -->
+<!-- EN-Revision: 1.12 Maintainer: dallas Status: ready -->
<refentry id="function.end">
<refnamediv>
<refname>end</refname>
@@ -13,11 +13,11 @@
<title>˵Ã÷</title>
<methodsynopsis>
<type>mixed</type><methodname>end</methodname>
-
<methodparam><type>array</type><parameter>array</parameter></methodparam>
+ <methodparam><type>array</type><parameter
role="reference">array</parameter></methodparam>
</methodsynopsis>
<para>
<function>end</function> ½« <parameter>array</parameter>
-
µÄÄÚ²¿Ö¸ÕëÒÆ¶¯µ½×îºóÒ»¸öµ¥Ôª£¬²¢·µ»Ø¸Ãµ¥ÔªµÄÖµ¡£
+ µÄÄÚ²¿Ö¸ÕëÒÆ¶¯µ½×îºóÒ»¸öµ¥Ôª²¢·µ»ØÆäÖµ¡£
</para>
<para>
<example>
@@ -25,18 +25,15 @@
<programlisting role="php">
<![CDATA[
<?php
-
- $fruits = array('apple','banana','cranberry');
-
- print end($fruits); // cranberry
-
+$fruits = array('apple','banana','cranberry');
+echo end($fruits); // cranberry
?>
]]>
</programlisting>
</example>
</para>
<para>
- ²Î¼û
<function>current</function>£¬<function>each</function>£¬<function>next</function>
+ ²Î¼û
<function>current</function>£¬<function>each</function>£¬<function>prev</function>£¬<function>next</function>
ºÍ <function>reset</function>¡£
</para>
</refsect1>