Integrate user note 26786

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@345313 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2018-07-14 11:43:33 +00:00
parent 3e4dcbc1d3
commit 4fff12b319

View file

@ -167,6 +167,37 @@ Array
[0] => b
[1] => c
)
]]>
</screen>
</example>
</para>
<para>
<example>
<title><function>array_slice</function> and array with mixed keys</title>
<programlisting role="php">
<![CDATA[
<?php
$ar = array('a'=>'apple', 'b'=>'banana', '42'=>'pear', 'd'=>'orange');
print_r(array_slice($ar, 0, 3));
print_r(array_slice($ar, 0, 3, true));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[a] => apple
[b] => banana
[0] => pear
)
Array
(
[a] => apple
[b] => banana
[42] => pear
)
]]>
</screen>
</example>