mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 01:42:09 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@171861 c90b9560-bf6c-de11-be94-00142212c4b1
77 lines
2.3 KiB
XML
77 lines
2.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.12 $ -->
|
|
<!-- EN-Revision: 1.11 Maintainer: didou Status: ready -->
|
|
<refentry id="function.array-change-key-case">
|
|
<refnamediv>
|
|
<refname>array_change_key_case</refname>
|
|
<refpurpose>Change la casse des clés du tableau</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>array_change_key_case</methodname>
|
|
<methodparam><type>array</type><parameter>input</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>case</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>array_change_key_case</function> modifie les clés du
|
|
tableau <parameter>input</parameter> et force leur casse.
|
|
Le paramètre optionnel <parameter>case</parameter>
|
|
permet de forcer les chaînes de caractères en majuscules
|
|
<constant>CASE_UPPER</constant> ou minuscules
|
|
<constant>CASE_LOWER</constant>. La valeur par défaut
|
|
est <constant>CASE_LOWER</constant>. Cette fonction
|
|
laissera les clés numériques inchangées.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>array_change_key_case</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$input_array = array("PrEmIEr" => 1, "SecOnd" => 2);
|
|
print_r(array_change_key_case($input_array, CASE_UPPER));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[PREMIER] => 1
|
|
[SECOND] => 2
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Si un tableau possède des clefs qui seront identiques lors de l'exécution
|
|
de cette fonction (e.g. "<literal>cleF</literal>" et "<literal>CLef</literal>"),
|
|
la dernière valeur dans le tableau écrasera les précédentes.
|
|
</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
|
|
-->
|