philip Sun Nov 10 19:36:16 2002 EDT Modified files: /phpdoc/en/reference/array/functions array-map.xml Log: See also array_walk(); and some <?php ?> additions. Index: phpdoc/en/reference/array/functions/array-map.xml diff -u phpdoc/en/reference/array/functions/array-map.xml:1.5 phpdoc/en/reference/array/functions/array-map.xml:1.6 --- phpdoc/en/reference/array/functions/array-map.xml:1.5 Sat Oct 26 16:40:42 2002 +++ phpdoc/en/reference/array/functions/array-map.xml Sun Nov 10 19:36:16 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -30,6 +30,7 @@ <title><function>array_map</function> example</title> <programlisting role="php"> <![CDATA[ +<?php function cube($n) { return $n*$n*$n; } @@ -37,6 +38,7 @@ $a = array(1, 2, 3, 4, 5); $b = array_map("cube", $a); print_r($b); +?> ]]> </programlisting> <para> @@ -61,6 +63,7 @@ <title><function>array_map</function> - using more arrays</title> <programlisting role="php"> <![CDATA[ +<?php function show_Spanish($n, $m) { return "The number $n is called $m in Spanish"; } @@ -77,6 +80,7 @@ $d = array_map("map_Spanish", $a , $b); print_r($d); +?> ]]> </programlisting> <para> @@ -144,12 +148,14 @@ <title>Creating an array of arrays</title> <programlisting role="php"> <![CDATA[ +<?php $a = array(1, 2, 3, 4, 5); $b = array("one", "two", "three", "four", "five"); $c = array("uno", "dos", "tres", "cuatro", "cinco"); $d = array_map(null, $a, $b, $c); print_r($d); +?> ]]> </programlisting> </example> @@ -200,8 +206,9 @@ </screen> </para> <para> - See also <function>array_filter</function> and - <function>array_reduce</function>. + See also <function>array_filter</function>, + <function>array_reduce</function>, and + <function>array_walk</function>. </para> </refsect1> </refentry>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php