Goto main content

implode

Join array elements with a string.

IMPLODE

NAME

implode - Joins array elements with a string.

SYNOPSIS

implode(glue,pieces)

PARAMETERS

glue
The string element that will go between all the pieces the user wants to join.
 
pieces
The array of strings to implode.

RETURN

This function returns a string representation of all the array elements the user chose and the glue element between each of them. The array elements, the pieces will appear in the same order.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

in:  res={_{implode(",",["a","b"]);}}.
out: res=a,b.

in:  res={_{implode(",",{"1":"a","a":"b"});}}.
out: res=.

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.