Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

volt join filter dont work

Debian 10, PHP 7.3, Phalcon 4 documentation code dont work {# join filter #} {% set joined = 'a'..'z'|join(',') %}

get error: Warning: join(): Invalid arguments passed



3.9k
Accepted
answer

It works, but maybe it's not clear in documentation how it works. Join is alias to php implode function where you have separator and array. So you need put code like this:

{% set joined = ['a','z']|join(',') %}


993

thank you! I understand. In phalcon 3 was join(), now we must write join('')