How can one use the equivalent of the implode
function in a Twig environment?
For example, the contents of the variable $data1 = "input your name"
and the variable $data2 = "input your address"
.
How to create a variable $result = "input your name, input your address"
in Twig?
{% set result = data1 ~ ", " ~ data2 %}
. But then I don't really get why you posted your question with '$'s in front of the variable names... If just want to output the two string, you could always do something like{{data1}}, {{data2}}
– Upright