mirror of
https://github.com/php/doc-ro.git
synced 2026-03-23 23:12:26 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/ro/trunk@348194 c90b9560-bf6c-de11-be94-00142212c4b1
194 lines
4.5 KiB
XML
194 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- $Author$ -->
|
|
<!-- EN-Revision: b455daa1c77ecf415cb55be7a594b5ba4603db00 Maintainer: simionea Status: ready -->
|
|
<!-- CREDITS: adiju -->
|
|
|
|
<refentry xml:id="function.array-fill" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_fill</refname>
|
|
<refpurpose>Completează un tablou cu valori</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>
|
|
Completează un tablou cu
|
|
<parameter>num</parameter> înregistrări cu valoarea parametrului
|
|
<parameter>value</parameter>, cheile începând de la valoarea parametrului
|
|
<parameter>start_index</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term><parameter>start_index</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Primul indice al tabloului întors.
|
|
</para>
|
|
<para>
|
|
Dacă <parameter>start_index</parameter> este negativ, primul indice al
|
|
tabloului întors va fi <parameter>start_index</parameter> și următorii
|
|
indici vor începe de la zero
|
|
(vedeți <link linkend="function.array-fill.example.basic">exemplul</link>).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><parameter>num</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Numărul elementelor pentru a fi inserate.
|
|
Trebuie să fie mai mare decât sau egal cu zero.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><parameter>value</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Valoarea utilizată pentru a completa tabloul
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Întoarce tabloul completat
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Emite o <constant>E_WARNING</constant> dacă <parameter>num</parameter>
|
|
este mai mic decât zero.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>5.6.0</entry>
|
|
<entry>
|
|
<parameter>num</parameter> nu poate fi zero. Anterior
|
|
<parameter>num</parameter> trebuia să fie mai mare decât zero.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example xml:id="function.array-fill.example.basic">
|
|
<title>Exemplu <function>array_fill</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$a = array_fill(5, 6, 'banana');
|
|
$b = array_fill(-2, 4, 'pear');
|
|
print_r($a);
|
|
print_r($b);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[5] => banana
|
|
[6] => banana
|
|
[7] => banana
|
|
[8] => banana
|
|
[9] => banana
|
|
[10] => banana
|
|
)
|
|
Array
|
|
(
|
|
[-2] => pear
|
|
[0] => pear
|
|
[1] => pear
|
|
[2] => pear
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<para>
|
|
Accesați de asemenea secțiunea manualului referitoare la
|
|
<link linkend="language.types.array">Tablouri</link>
|
|
pentru o explicație detaliată a cheilor negative.
|
|
</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
|
|
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:"~/.phpdoc/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
|
|
-->
|