Published on : July 31, 2020
Title : php.implode
Purpose : Join array elements with a string
Syntax : [php.implode p1=’separator’ p2=’array’ o.set=’variable name’ /]
Input Parameters :
p1 : Optional parameter. Specifies what to put between the array elements. Default is “” (an empty string)
p2 : Required parameter. The array to join to a string
Return Value : Returns a string from the elements of an array
Example 1 :
Code : [template.set_array array]
    [one]one[/one]
    [two]two[/two]
    [three]three[/three]
    [four]four[/four]
[/template.set_array]
[php.implode p1=” ” p2=”{template.array}” o.set=template.string /]
Output : string(18) “one two three four”
Description : It will convert the array elements to string by the seperator (space) and assign to the string to variable (template.string)