We are moving our forum in GitHub Discussions.
For questions about Phalcon v3/v4 you can visit
here
and for Phalcon v5
here.
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.
:) That is true, but there is "native" way (not need function to add) xD. Example in volt (variable menu contain string, tmp_dropdown is array- they can be defined in controller):
{% set tmp_dropdown = ['menu', 'texts', 'broadcasts'] %}
{% set menu = 'texts' %}
{% if menu in tmp_dropdown %}YES{% endif %}