cvs: phpdoc-hu /reference/array/functions key.xml
| From: | Cece) Szabolcs | Date: | Fri, 13 Feb 2004 18:09:00 +0000 |
| Subject: | cvs: phpdoc-hu /reference/array/functions key.xml | ||
| Groups: | php.doc.hu | ||
| Request: | Send a blank email to doc-hu+get-447@lists.php.net to get a copy of this message | ||
cece Fri Feb 13 13:09:00 2004 EDT
Modified files:
/phpdoc-hu/reference/array/functions key.xml
Log:
sync with EN revision
http://cvs.php.net/diff.php/phpdoc-hu/reference/array/functions/key.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc-hu/reference/array/functions/key.xml
diff -u phpdoc-hu/reference/array/functions/key.xml:1.3
phpdoc-hu/reference/array/functions/key.xml:1.4
--- phpdoc-hu/reference/array/functions/key.xml:1.3 Wed Aug 14 12:56:19 2002
+++ phpdoc-hu/reference/array/functions/key.xml Fri Feb 13 13:08:59 2004
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- splitted from ./hu/functions/array.xml, last change in rev 1.3 -->
<!-- last change to 'key' in en/ tree in rev 1.2 -->
-<!-- EN-Revision: 1.4 Maintainer: gerzson Status: ready -->
+<!-- EN-Revision: 1.7 Maintainer: gerzson Status: ready -->
<!-- OLD-Revision: 1.173/EN.1.2 -->
<refentry id="function.key">
<refnamediv>
@@ -21,6 +21,32 @@
kijelölt elem kulcsával tér vissza.
</para>
<para>
+ <example>
+ <title><function>key</function> példa</title>
+ <programlisting role="php">
+ <![CDATA[
+ <?php
+ $array = array(
+ 'gyumolcs1' => 'alma',
+ 'gyumolcs2' => 'narancs',
+ 'gyumolcs3' => 'szõlõ',
+ 'gyumolcs4' => 'alma',
+ 'gyumolcs5' => 'alma');
+
+ // ez a ciklus kiírja azon tömbelemek kulcsát,
+ // ahol annak értéke 'alma'
+ while ($fruit_name = current($array)) {
+ if ($fruit_name == 'alma') {
+ echo key($array) . '<br />';
+ }
+ next($array);
+ }
+ ?>
+ ]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
Lásd még: <function>current</function> és <function>next</function>!
</para>
</refsect1>