Submitted : |implode

**SPIP**

# Article submitted

The article "**|implode**
(https://www.spip.net/ecrire/?exec=article&id_article=6569)" is submitted
for publication. on Monday 25 May 2020.

* * *

## |implode

Monday 25 May 2020 , by [jack](.././?page=auteur&id_auteur=593&)

The filter `|implode` applies to an array.

The **code>|implode</code>** filter is used to gather an array into a
string containing the elements linked by a separator.

For example, from `[(#SET{my_table, #ARRAY{cle1, 1999, cle2, 12, cle3,
31}})]`, `[(#GET{my_table}|implode{-})]` will return: "1999-12-31"

**Warning:**
- if the separator is the comma character, it should be enclosed in single
quotes:
`[(#GET{my_array}|implode{', '})]`
- To make the filter more convenient to use in templates, `|implode`
reverses the writing of the PHP function of the same name.

* * *

See also the filter |explode
(https://www.spip.net/ecrire/?exec=article&id_article=6568)

— Sent by SPIP (https://www.spip.net/)

rubon199.jpg

puce.gif