Simpler example (bug #42889)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@246612 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2007-11-21 15:01:30 +00:00
parent b5bdde358e
commit 2b6db861d1

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.19 $ -->
<!-- $Revision: 1.20 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.11 -->
<refentry xml:id="function.array-multisort" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@ -79,8 +79,8 @@
<programlisting role="php">
<![CDATA[
<?php
$ar1 = array("10", 100, 100, "a");
$ar2 = array(1, 3, "2", 1);
$ar1 = array(10, 100, 100, 0);
$ar2 = array(1, 3, 2, 4);
array_multisort($ar1, $ar2);
var_dump($ar1);
@ -89,23 +89,23 @@ var_dump($ar2);
]]>
</programlisting>
<para>
In this example, after sorting, the first array will contain "10",
"a", 100, 100. The second array will contain 1, 1, "2", 3. The
In this example, after sorting, the first array will contain 0,
10, 100, 100. The second array will contain 4, 1, 2, 3. The
entries in the second array corresponding to the identical
entries in the first array (100 and 100) were sorted as well.
</para>
<screen>
<![CDATA[
array(4) {
[0]=> string(2) "10"
[1]=> string(1) "a"
[0]=> int(0)
[1]=> int(10)
[2]=> int(100)
[3]=> int(100)
}
array(4) {
[0]=> int(1)
[0]=> int(4)
[1]=> int(1)
[2]=> string(1) "2"
[2]=> int(2)
[3]=> int(3)
}
]]>