mirror of
https://github.com/php/doc-ja.git
synced 2026-03-30 19:12:28 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@189166 c90b9560-bf6c-de11-be94-00142212c4b1
82 lines
2.6 KiB
XML
82 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- splitted from ./ja/functions/strings.xml, last change in rev 1.1 -->
|
|
<!-- EN-Revision: 1.11 Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: shimooka -->
|
|
<refentry id="function.implode">
|
|
<refnamediv>
|
|
<refname>implode</refname>
|
|
<refpurpose>配列要素を文字列により連結する</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>説明</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>implode</methodname>
|
|
<methodparam><type>string</type><parameter>glue</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter>pieces</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
すべての配列要素の順序を変えずに、各要素間に
|
|
<parameter>glue</parameter>文字列をはさんで 1 つの文字列にして返し
|
|
ます。
|
|
<example>
|
|
<title><function>implode</function>の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$array = array('lastname', 'email', 'phone');
|
|
$comma_separated = implode(",", $array);
|
|
|
|
echo $comma_separated; // lastname,email,phone
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
<function>implode</function>は、歴史的な理由により、引数をどちら
|
|
の順番でも受けつけることが可能です。しかし、
|
|
<function>explode</function>との統一性の観点からは、
|
|
ドキュメントに記述された引数の順番を使用する方が混乱が少なくなる
|
|
でしょう。
|
|
</para>
|
|
</note>
|
|
<note>
|
|
<para>
|
|
PHP 4.3.0 以降、<function>implode</function> の glue
|
|
パラメータはオプションとなり、デフォルトは空文字 ('') です。
|
|
これは <function>implode</function> の好ましい使用法ではありません。
|
|
下位互換性のため、常に 2 つのパラメータを使用することが推奨されいます。
|
|
</para>
|
|
</note>
|
|
<simpara>
|
|
<function>explode</function>,
|
|
<function>split</function>も参照ください。
|
|
</simpara>
|
|
</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
|
|
-->
|