mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 09:52:17 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@222717 c90b9560-bf6c-de11-be94-00142212c4b1
80 lines
2.0 KiB
XML
80 lines
2.0 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.18 $ -->
|
|
<!-- EN-Revision: 1.10 Maintainer: didou Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry id="function.array-fill">
|
|
<refnamediv>
|
|
<refname>array_fill</refname>
|
|
<refpurpose>Remplis un tableau avec une même valeur</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&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>
|
|
<function>array_fill</function> crée un tableau avec
|
|
<parameter>num</parameter> entrées de la valeur
|
|
<parameter>value</parameter>. Les index commençant à la valeur
|
|
<parameter>start_index</parameter>. Notez que si
|
|
<parameter>num</parameter> n'est pas un nombre supérieur à zéro,
|
|
&php; affichera une alerte.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>array_fill</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$a = array_fill(5, 6, 'banane');
|
|
print_r($a);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[5] => banane
|
|
[6] => banane
|
|
[7] => banane
|
|
[8] => banane
|
|
[9] => banane
|
|
[10] => banane
|
|
)]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Voir aussi
|
|
<function>str_repeat</function> et
|
|
<function>range</function>.
|
|
</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:"../../../../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
|
|
-->
|