Date: 11/10/01
- Next message: Andrei Zmievski: "Re: [PHP-DOC] docs request"
- Previous message: Hartmut Holzgraefe: "[PHP-DOC] cvs: phpdoc /cs bookinfo.xml preface.xml /cs/features connection-handling.xml cookies.xml http-auth.xml images.xml persistent-connections.xml remote-files.xml /cs/functions apache.xml array.xml aspell.xml bc.xml calendar.xml ccvs.xml classobj.xml com.xml curl.xml cybercash.xml dbm.xml dir.xml dl.xml domxml.xml exec.xml filepro.xml filesystem.xml funchand.xml gettext.xml http.xml icap.xml info.xml mail.xml mhash.xml misc.xml nis.xml openssl.xml outcontrol.xml pdf.xml pfpro.xml readline.xml recode.xml satellite.xml sem.xml shmop.xml strings.xml url.xml wddx.xml xslt.xml /cs/language basic-syntax.xml constants.xml /de/chapters install.xml security.xml /de/functions array.xml com.xml fdf.xml filesystem.xml ingres_ii.xml ircg.xml recode.xml satellite.xml zip.xml /de/pear about.xml standards.xml /en bookinfo.xml preface.xml /en/appendices aliases.xml commandline.xml debugger.xml escaping.xml history.xml http-stuff.xml migration.xml migration4.xml phpdevel.xml regexp.xml reserved.xml reso"
- Next in thread: Gabor Hojtsy: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
goba Sat Nov 10 17:11:40 2001 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
Expanding example of array_chunk
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.111 phpdoc/en/functions/array.xml:1.112
--- phpdoc/en/functions/array.xml:1.111 Sat Nov 10 16:49:32 2001
+++ phpdoc/en/functions/array.xml Sat Nov 10 17:11:39 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.111 $ -->
+<!-- $Revision: 1.112 $ -->
<reference id="ref.array">
<title>Array Functions</title>
<titleabbrev>Arrays</titleabbrev>
@@ -169,17 +169,55 @@
<title><function>array_chunk</function> example</title>
<programlisting role="php">
$input_array = array('a', 'b', 'c', 'd', 'e');
-$output_array = array_chunk($input_array, 2);
-/*
- the structure of $output_array will be:
- array(
- array('a', 'b'),
- array('c', 'd'),
- array('e')
- )
-*/
+print_r(array_chunk($input_array, 2));
+print_r(array_chunk($input_array, 2, TRUE));
</programlisting>
</example>
+ The printout of the above program will be:
+ <informalexample>
+ <programlisting>
+Array
+(
+ [0] => Array
+ (
+ [0] => a
+ [1] => b
+ )
+
+ [1] => Array
+ (
+ [0] => c
+ [1] => d
+ )
+
+ [2] => Array
+ (
+ [0] => e
+ )
+
+)
+Array
+(
+ [0] => Array
+ (
+ [0] => a
+ [1] => b
+ )
+
+ [1] => Array
+ (
+ [2] => c
+ [3] => d
+ )
+
+ [2] => Array
+ (
+ [4] => e
+ )
+
+)
+ </programlisting>
+ </informalexample>
</para>
</refsect1>
</refentry>
- Next message: Andrei Zmievski: "Re: [PHP-DOC] docs request"
- Previous message: Hartmut Holzgraefe: "[PHP-DOC] cvs: phpdoc /cs bookinfo.xml preface.xml /cs/features connection-handling.xml cookies.xml http-auth.xml images.xml persistent-connections.xml remote-files.xml /cs/functions apache.xml array.xml aspell.xml bc.xml calendar.xml ccvs.xml classobj.xml com.xml curl.xml cybercash.xml dbm.xml dir.xml dl.xml domxml.xml exec.xml filepro.xml filesystem.xml funchand.xml gettext.xml http.xml icap.xml info.xml mail.xml mhash.xml misc.xml nis.xml openssl.xml outcontrol.xml pdf.xml pfpro.xml readline.xml recode.xml satellite.xml sem.xml shmop.xml strings.xml url.xml wddx.xml xslt.xml /cs/language basic-syntax.xml constants.xml /de/chapters install.xml security.xml /de/functions array.xml com.xml fdf.xml filesystem.xml ingres_ii.xml ircg.xml recode.xml satellite.xml zip.xml /de/pear about.xml standards.xml /en bookinfo.xml preface.xml /en/appendices aliases.xml commandline.xml debugger.xml escaping.xml history.xml http-stuff.xml migration.xml migration4.xml phpdevel.xml regexp.xml reserved.xml reso"
- Next in thread: Gabor Hojtsy: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

