mirror of
https://github.com/php/doc-ru.git
synced 2025-08-02 13:56:48 +00:00
Updated translation.
git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@308003 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
@ -1,67 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: n/a Maintainer: sveta Status: ready -->
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: shein Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<!-- $Revision$ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<refentry xml:id="function.rsort" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>rsort</refname>
|
||||
<refpurpose>Отсортировать массив в обратном порядке</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Описание</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>rsort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Эта функция сортирует массив в обратном порядке (от большего к меньшему).
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>rsort</function></title>
|
||||
<programlisting role="php">
|
||||
<refentry xml:id="function.rsort" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>rsort</refname>
|
||||
<refpurpose>Сортирует массив в обратном порядке</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>rsort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Эта функция сортирует массив в обратном порядке (от большего к меньшему).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Входной массив.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Вы можете изменить поведение сортировки, используя дополнительный
|
||||
параметр <parameter>sort_flags</parameter>, подробнее
|
||||
смотрите функцию <function>sort</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>rsort</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fruits = array("lemon", "orange", "banana", "apple");
|
||||
rsort($fruits);
|
||||
reset($fruits);
|
||||
while (list($key, $val) = each($fruits)) {
|
||||
echo "$key = $val
|
||||
";
|
||||
foreach ($fruits as $key => $val) {
|
||||
echo "$key = $val\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
0 = orange
|
||||
1 = lemon
|
||||
2 = banana
|
||||
3 = apple
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
<para>
|
||||
Названия фруктов были отсортированы по алфавиту в обратном порядке.
|
||||
</para>
|
||||
<para>
|
||||
Вы можете изменить поведение сортировки, используя дополнительный
|
||||
параметр <parameter>sort_flags</parameter>, подробнее
|
||||
см. <function>sort</function>.
|
||||
</para>
|
||||
<para>
|
||||
См. также <function>arsort</function>,
|
||||
<function>asort</function>, <function>ksort</function>,
|
||||
<function>sort</function> и <function>usort</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.no-key-association;
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>arsort</function></member>
|
||||
<member><function>krsort</function></member>
|
||||
<member>&seealso.array.sorting;</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
@ -74,7 +107,7 @@ sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../~/.phpdoc/manual.ced"
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
|
Reference in New Issue
Block a user