1
0
mirror of https://github.com/php/doc-it.git synced 2026-04-29 10:13:13 +02:00
Files
archived-doc-it/reference/array/functions/array-combine.xml
T
Hannes Magnusson 09e5c197f0 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there
 - Bump EN-Revision where appropriate


git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@238331 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-23 13:27:51 +00:00

84 lines
2.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- EN-Revision: 1.5 Maintainer: gurugeek Status: ready -->
<refentry xml:id="function.array-combine" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>array_combine</refname>
<refpurpose>
Crea un'array utilizzando un'array per le chiavi e un'altro per i suoi valori
</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>array</type><methodname>array_combine</methodname>
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
<methodparam><type>array</type><parameter>values</parameter></methodparam>
</methodsynopsis>
<para>
Restituisce un'<type>array</type> utilizzando i valori dell'array
<parameter>keys</parameter> come chiavi e i valori dall'
array <parameter>values</parameter> come valori corrispondenti.
</para>
<para>
Restituisce &false; se il numero degli elementi in ogni array non è uguale
o se gli array sono vuoti.
</para>
<para>
<example>
<title>Esempio di <function>array_combine</function></title>
<programlisting role="php">
<![CDATA[
<?php
$a = array('verde', 'rosso', 'giallo');
$b = array('avocado', 'mela', 'banana');
$c = array_combine($a, $b);
print_r($c);
?>
]]>
</programlisting>
<para>
Il risultato è:
</para>
<screen>
<![CDATA[
Array
(
[verde] => avocado
[rosso] => mela
[giallo] => banana
)
]]>
</screen>
</example>
</para>
<para>
Vedere anche <function>array_merge</function>,
<function>array_walk</function> e
<function>array_values</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
-->