svn: /phpdoc/ru/trunk/reference/array/functions/ array-fill.xml
| From: | Shein Alexey | Date: | Thu, 27 Jan 2011 12:10:02 +0000 |
| Subject: | svn: /phpdoc/ru/trunk/reference/array/functions/ array-fill.xml | ||
| Groups: | php.doc.ru | ||
| Request: | Send a blank email to doc-ru+get-1282@lists.php.net to get a copy of this message | ||
shein Thu, 27 Jan 2011 12:10:02 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307781
Log:
Updated translation.
Changed paths:
U phpdoc/ru/trunk/reference/array/functions/array-fill.xml
Modified: phpdoc/ru/trunk/reference/array/functions/array-fill.xml
===================================================================
--- phpdoc/ru/trunk/reference/array/functions/array-fill.xml 2011-01-27 11:55:38 UTC (rev 307780)
+++ phpdoc/ru/trunk/reference/array/functions/array-fill.xml 2011-01-27 12:10:02 UTC (rev 307781)
@@ -1,37 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: n/a Maintainer: tronic Status: ready -->
+<!-- EN-Revision: 297028 Maintainer: shein Status: ready -->
+<!-- Reviewed: no -->
<!-- $Revision$ -->
-<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
- <refentry xml:id="function.array-fill" xmlns="http://docbook.org/ns/docbook">
- <refnamediv>
- <refname>array_fill</refname>
- <refpurpose>Заполнить массив определенным
значением</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Описание</title>
- <methodsynopsis>
- <type>array</type><methodname>array_fill</methodname>
-
<methodparam><type>integer</type><parameter>start_index</parameter></methodparam>
-
<methodparam><type>integer</type><parameter>num</parameter></methodparam>
-
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
- </methodsynopsis>
- <para>
- Функция <function>array_fill</function> возвращает массив,
- содержащий <parameter>num</parameter> элементов, имеющих
- значение параметра <parameter>value</parameter>.
Нумерация ключей элементов
- массива начинаются со значения параметра
<parameter>start_index</parameter> parameter.
- </para>
- <para>
- <example>
- <title>Пример использования
<function>array_fill</function></title>
- <programlisting role="php">
+<refentry xml:id="function.array-fill" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>array_fill</refname>
+ <refpurpose>Заполняет массив значениями</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>array</type><methodname>array_fill</methodname>
+
<methodparam><type>int</type><parameter>start_index</parameter></methodparam>
+
<methodparam><type>int</type><parameter>num</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Заполняет массив <parameter>num</parameter> элементами со
значением
+ <parameter>value</parameter>, начиная с ключа
<parameter>start_index</parameter>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+
+ <varlistentry>
+ <term><parameter>start_index</parameter></term>
+ <listitem>
+ <para>
+ Первый индекс возвращаемого массива.
+ Поддерживает только неотрицательные индексы.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>num</parameter></term>
+ <listitem>
+ <para>
+ Количество вставляемых элементов
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>value</parameter></term>
+ <listitem>
+ <para>
+ Значение для заполнения
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Возвращает заполненный мссив
+ </para>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ Генерирует ошибку уровня <constant>E_WARNING</constant>,
если <parameter>num</parameter>
+ меньше единицы.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Пример использования
<function>array_fill</function></title>
+ <programlisting role="php">
<![CDATA[
+<?php
$a = array_fill(5, 6, 'banana');
+$b = array_fill(-2, 2, 'pear');
+print_r($a);
+print_r($b);
+?>
]]>
- </programlisting>
- <para>
- Переменная $a теперь содержит следующие значения
(вывод функции <function>print_r</function>):
- <screen>
+ </programlisting>
+ &example.outputs;
+ <screen>
<![CDATA[
Array
(
@@ -42,14 +101,38 @@
[9] => banana
[10] => banana
)
+Array
+(
+ [-2] => pear
+ [0] => pear
+)
]]>
- </screen>
- </para>
- </example>
- </para>
- </refsect1>
- </refentry>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <para>
+ Смотрите также подробное описание отрицательных
ключей в разделе
+ <link linkend="language.types.array">Массивы</link>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>array_fill_keys</function></member>
+ <member><function>str_repeat</function></member>
+ <member><function>range</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -61,7 +144,7 @@
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