1
0
mirror of https://github.com/php/doc-zh.git synced 2026-03-26 08:02:16 +01:00
Files
archived-doc-zh/reference/array/functions/array-change-key-case.xml
Dallas Wang 580b23e287 Translation completed.
git-svn-id: https://svn.php.net/repository/phpdoc/zh/trunk@94824 c90b9560-bf6c-de11-be94-00142212c4b1
2002-09-06 06:33:42 +00:00

68 lines
1.9 KiB
XML
Executable File

<?xml version="1.0" encoding="gb2312"?>
<!-- $Revision: 1.1 $ -->
<!-- $Author: dallas $ -->
<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready -->
<refentry id="function.array-change-key-case">
<refnamediv>
<refname>array_change_key_case</refname>
<refpurpose>返回字符串键名全为小写或大写的数组</refpurpose>
</refnamediv>
<refsect1>
<title>说明</title>
<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><parameter>input</parameter>
数组中的所有键名改为全小写或大写。改变是根据后一个选项 <parameter>case</parameter>
参数来进行的。可以在这里用两个常量,<constant>CASE_UPPER</constant>
<constant>CASE_LOWER</constant>。默认值是
<constant>CASE_LOWER</constant>。本函数不改变数字索引。
</para>
<example>
<title><function>array_change_key_case</function> 例子</title>
<programlisting role="php">
<![CDATA[
$input_array = array("FirSt" => 1, "SecOnd" => 4);
print_r(array_change_key_case($input_array, CASE_UPPER));
]]>
</programlisting>
<para>
以上程序显示结果为:
<screen>
<![CDATA[
Array
(
[FIRST] => 1
[SECOND] => 2
)
]]>
</screen>
</para>
</example>
</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
-->