We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Volt Concat Variable

Hello..

How to concate volt variable like this:

$var = 'abc';

$var .= 'def';

$var .= 'ghi';

echo $var; output: abcdefghi

Thanks



10.5k
Accepted
answer
edited Mar '15

depending on Volt documentation it should be something like this:

{% set var = "abc" %}
{% set var = var ~ "def" %}
{% set var = var ~ "ghi" %}