1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-26 08:12:07 +01:00
Files
archived-doc-de/reference/array/functions/array-combine.xml
Nilgün Belma Bugüner fd2f75e1a8 changed EN-Revision tag as cvs2svn
fixed svn properties

git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@283886 c90b9560-bf6c-de11-be94-00142212c4b1
2009-07-11 22:21:12 +00:00

82 lines
2.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: n/a Maintainer: nobody Status: ready -->
<refentry xml:id="function.array-combine" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>array_combine</refname>
<refpurpose>Erzeugt ein Array, indem es ein Array für die Schlüsel und ein
anderes für die Werte verwendet</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<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>
Gibt ein <type>array</type> zurück, in dem die Werte des
<parameter>keys</parameter> Array als Schlüssel und die Werte aus dem
<parameter>values</parameter> Array als die zugehörigen Werte verwendet
werden.
</para>
<para>
Gibt &false; zurück, wenn die Anzahl von Elementen nicht in beiden Arrays
identisch ist oder die Arrays leer sind.
</para>
<para>
<example>
<title>Ein einfaches <function>array_combine</function> Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
$a = array('gruen', 'rot', 'gelb');
$b = array('avokado', 'apfel', 'banane');
$c = array_combine($a, $b);
print_r($c);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[gruen] => avokado
[rot] => apfel
[gelb] => banane
)
]]>
</screen>
</example>
</para>
<para>
Siehe auch <function>array_merge</function>,
<function>array_walk</function>, und
<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
-->