cvs: phpdoc-sk /reference/array/functions array-chunk.xml

[email protected] ("Joseph Drake")
Newsgroups php.doc.sk
Message-ID <cvsjoseph1041126201@cvsserver>
joseph		Sat Dec 28 20:43:21 2002 EDT

  Added files:                 
    /phpdoc-sk/reference/array/functions	array-chunk.xml 
  Log:
  gettin diz dun
  

Index: phpdoc-sk/reference/array/functions/array-chunk.xml
+++ phpdoc-sk/reference/array/functions/array-chunk.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- EN-Revision: 1.6 Maintainer: joseph Status: working -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
  <refentry id="function.array-chunk">
   <refnamediv>
    <refname>array_chunk</refname>
    <refpurpose>Rozdeµuje pole do dávok informácií</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Popis</title>
     <methodsynopsis>
      <type>array</type><methodname>array_chunk</methodname>
      <methodparam><type>array</type><parameter>vstup</parameter></methodparam>
      <methodparam><type>int</type><parameter>veµkos»</parameter></methodparam>
      <methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>array_chunk</function> splits the array into
     several arrays with <parameter>size</parameter> values
     in them. You may also have an array with less values
     at the end. You get the arrays as members of a
     multidimensional array indexed with numbers starting
     from zero.
    </para>
    <para>
     By setting the optional <parameter>preserve_keys</parameter>
     parameter to &true;, you can force PHP to preserve the original
     keys from the input array. If you specify &false; new number
     indices will be used in each resulting array with
     indices starting from zero. The default is &false;.
    </para>
    <example>
     <title><function>array_chunk</function> example</title>
     <programlisting role="php">
<![CDATA[
$input_array = array('a', 'b', 'c', 'd', 'e');
print_r(array_chunk($input_array, 2));
print_r(array_chunk($input_array, 2, TRUE));
]]>
     </programlisting>
     <para>
      The printout of the above program will be:
      <screen>
<![CDATA[
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
        )

)
]]>
      </screen>
     </para>
    </example>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.