mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
127 lines
2.9 KiB
XML
127 lines
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: felipe, fabioluciano, leonardolara -->
|
|
<refentry xml:id="function.array-fill-keys" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_fill_keys</refname>
|
|
<refpurpose>Preenche um array com valores, especificando chaves</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>array_fill_keys</methodname>
|
|
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Preenche um array com o
|
|
valor do parâmetro <parameter>value</parameter>, usando os
|
|
valores do array <parameter>keys</parameter> como chaves.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term><parameter>keys</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Array de valores que serão usados como chaves. Valores ilegais
|
|
para chaves serão convertidos para <type>string</type>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><parameter>value</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Valor para usar no preenchimento
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retorna o array preenchido
|
|
</para>
|
|
</refsect1>
|
|
|
|
<!--
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
&errors.no.unusual.warnings;
|
|
</refsect1>
|
|
-->
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemplo da função <function>array_fill_keys</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$keys = array('foo', 5, 10, 'bar');
|
|
$a = array_fill_keys($keys, 'banana');
|
|
print_r($a);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[foo] => banana
|
|
[5] => banana
|
|
[10] => banana
|
|
[bar] => banana
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>array_fill</function></member>
|
|
<member><function>array_combine</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
|
|
-->
|