1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-27 00:42:10 +01:00
Files
archived-doc-es/reference/strings/functions/implode.xml
Pedro Antonio Gil Rodríguez b70c3dac00 Actualización a la última versión
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@334648 c90b9560-bf6c-de11-be94-00142212c4b1
2014-08-28 16:44:54 +00:00

129 lines
3.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8b5940cadeb4f1c8492f4a7f70743a2be807cf39 Maintainer: yago Status: ready -->
<!-- Reviewed: yes Maintainer: andresdzphp -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.implode">
<refnamediv>
<refname>implode</refname>
<refpurpose>Une elementos de un array en un string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>implode</methodname>
<methodparam><type>string</type><parameter>glue</parameter></methodparam>
<methodparam><type>array</type><parameter>pieces</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>string</type><methodname>implode</methodname>
<methodparam><type>array</type><parameter>pieces</parameter></methodparam>
</methodsynopsis>
<para>
Une elementos de un array en un string con <parameter>glue</parameter> (pegamento).
</para>
<note>
<para>
Por razones históricas <function>implode</function> puede aceptar
parámetros en cualquier orden. Para matener una consistencia respecto a
<function>explode</function>, puede que sea menos confuso
usar el orden de argumentos de la documentación.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>glue</parameter></term>
<listitem>
<para>
Por defecto es un string vacío.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>pieces</parameter></term>
<listitem>
<para>
El array de strings a ser usados por implode.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Devuelve un string que contiene la representación de todos los elementos
del array en el mismo orden, con el string 'glue' entre cada elemento.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Ejemplo de <function>implode</function></title>
<programlisting role="php">
<![CDATA[
<?php
$array = array('apellido', 'email', 'teléfono');
$separado_por_comas = implode(",", $array);
echo $separado_por_comas; // apellido,email,teléfono
// Devuelve un string vacío si se usa un array vacío:
var_dump(implode('hola', array())); // string(0) ""
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&note.bin-safe;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>explode</function></member>
<member><function>preg_split</function></member>
<member><function>http_build_query</function></member>
</simplelist>
</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:"~/.phpdoc/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
-->