cvs: phpdoc-hu /reference/array/functions array-reduce.xml
| From: | Cece) Szabolcs | Date: | Thu, 05 Aug 2004 21:45:09 +0000 |
| Subject: | cvs: phpdoc-hu /reference/array/functions array-reduce.xml | ||
| Groups: | php.doc.hu | ||
| Request: | Send a blank email to doc-hu+get-889@lists.php.net to get a copy of this message | ||
cece Thu Aug 5 17:45:09 2004 EDT
Modified files:
/phpdoc-hu/reference/array/functions array-reduce.xml
Log:
sync
http://cvs.php.net/diff.php/phpdoc-hu/reference/array/functions/array-reduce.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc-hu/reference/array/functions/array-reduce.xml
diff -u phpdoc-hu/reference/array/functions/array-reduce.xml:1.3
phpdoc-hu/reference/array/functions/array-reduce.xml:1.4
--- phpdoc-hu/reference/array/functions/array-reduce.xml:1.3 Wed Aug 14 12:56:19 2002
+++ phpdoc-hu/reference/array/functions/array-reduce.xml Thu Aug 5 17:45:08 2004
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- splitted from ./hu/functions/array.xml, last change in rev 1.3 -->
<!-- last change to 'array-reduce' in en/ tree in rev 1.2 -->
-<!-- EN-Revision: 1.4 Maintainer: gerzson Status: ready -->
+<!-- EN-Revision: 1.8 Maintainer: cece Status: ready -->
+<!-- CREDITS: gerzson -->
<!-- OLD-Revision: 1.173/EN.1.2 -->
<refentry id="function.array-reduce">
<refnamediv>
@@ -15,12 +16,12 @@
<methodsynopsis>
<type>mixed</type><methodname>array_reduce</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
-
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
+
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>initial</parameter></methodparam>
</methodsynopsis>
<para>
Az <function>array_reduce</function> ismétlõdve meghívja a
- <parameter>callback</parameter> függvényt paraméterként
+ <parameter>function</parameter> függvényt paraméterként
az <parameter>input</parameter> tömb elemeivel, hogy végül egy elemi
értékké alakítsa át a tömböt. Az elhagyható <parameter>intial</parameter>
megadásával beállítható egy tetszõleges kezdõ érték a folyamat legelején.
@@ -31,12 +32,15 @@
<title><function>array_reduce</function> példa</title>
<programlisting role="php">
<![CDATA[
-function rsum($v, $w) {
+<?php
+function rsum($v, $w)
+{
$v += $w;
return $v;
}
-function rmul($v, $w) {
+function rmul($v, $w)
+{
$v *= $w;
return $v;
}
@@ -46,6 +50,7 @@
$b = array_reduce($a, "rsum");
$c = array_reduce($a, "rmul", 10);
$d = array_reduce($x, "rsum", 1);
+?>
]]>
</programlisting>
</example>
@@ -57,8 +62,11 @@
<varname>$d</varname> = <literal>1</literal>.
</para>
<para>
- Lásd még: <function>array_filter</function> és
- <function>array_map</function>!
+ Lásd még:
+ <function>array_filter</function>,
+ <function>array_map</function>,
+ <function>array_unique</function> és
+ <function>array_count_values</function>.
</para>
</refsect1>
</refentry>